Reputation: 87
I am using FiftyOne operators to improve a dataset.
The exact operator I'm using is from here : https://github.com/jacobmarks/image-quality-issues
Here is my code :
def compute_image_quality(dataset, features_thresholds: dict):
for feature in features_thresholds:
if features_thresholds[feature]:
compute = foo.get_operator(f"@jacobmarks/image_issues/compute_{feature}")
compute(dataset)
dataset.save()
def main(datasets_list, features: dict):
for dataset_name in datasets_list:
fo.load_dataset(dataset_name)
compute_image_quality(fo.load_dataset(dataset_name), features)
It works for every datasets, except those who takes more than 15 minutes to be analyzed.
I couldn't find anything about setting timeout in function arguments neither in FiftyOne documentation.
I can't figure out if it's a issue with the plugin, FiftyOne of just a matter of configuration.
Upvotes: 0
Views: 83
Reputation: 111
As you discovered, you can set the operator timeout in your FiftyOne Config as described here: https://docs.voxel51.com/user_guide/config.html#configuration-options.
However, for longer-running operations like this, the recommended approach is to run the operator in delegated execution mode. You should still be able to queue the job via python, by passing delegate=True
into the operator call. Then from the command line run:
fiftyone delegated launch
Upvotes: 1
Reputation: 87
After some research, I found a way to avoid such timeout by directly edit the FiftyOne config script fiftyone/core/config.py
.
Line 126 :
self.operator_timeout = self.parse_int(
d,
"operator_timeout",
env_var="FIFTYONE_OPERATOR_TIMEOUT",
default=600, # 600 seconds (10 minutes)
)
I changed default=600
to default=1000000000
(not very elegant but I didn't know if None
would have worked), and the computation of large datasets seems to work.
Upvotes: 0