fiftyone.factory.repos.delegated_operation¶
FiftyOne delegated operation repository.
Classes:
Base Class for a delegated operation repository. |
|
|
-
class
fiftyone.factory.repos.delegated_operation.
DelegatedOperationRepo
¶ Bases:
object
Base Class for a delegated operation repository.
Methods:
queue_operation
(**kwargs)Queue an operation to be executed by a delegated operator.
update_run_state
(_id, run_state[, result, …])Update the run state of an operation.
update_progress
(_id, progress)Update the progress of an operation.
get_queued_operations
([operator, dataset_name])Get all queued operations.
get_scheduled_operations
([operator, …])Get all scheduled operations.
get_running_operations
([operator, dataset_name])Get all running operations.
list_operations
([operator, dataset_name, …])List all operations.
delete_operation
(_id)Delete an operation.
delete_for_dataset
(dataset_id)Delete an operation.
set_pinned
(_id[, pinned])Sets the pinned flag on / off.
set_label
(_id, label)Sets the label for the delegated operation.
get
(_id)Get an operation by id.
count
([filters, search])Count all operations.
-
queue_operation
(**kwargs: Any) → fiftyone.factory.repos.delegated_operation_doc.DelegatedOperationDocument¶ Queue an operation to be executed by a delegated operator.
-
update_run_state
(_id: bson.objectid.ObjectId, run_state: fiftyone.operators.executor.ExecutionRunState, result: Optional[fiftyone.operators.executor.ExecutionResult] = None, run_link: Optional[str] = None, progress: Optional[fiftyone.operators.executor.ExecutionProgress] = None) → fiftyone.factory.repos.delegated_operation_doc.DelegatedOperationDocument¶ Update the run state of an operation.
-
update_progress
(_id: bson.objectid.ObjectId, progress: fiftyone.operators.executor.ExecutionProgress) → fiftyone.factory.repos.delegated_operation_doc.DelegatedOperationDocument¶ Update the progress of an operation.
-
get_queued_operations
(operator: Optional[str] = None, dataset_name=None) → List[fiftyone.factory.repos.delegated_operation_doc.DelegatedOperationDocument]¶ Get all queued operations.
-
get_scheduled_operations
(operator: Optional[str] = None, dataset_name=None) → List[fiftyone.factory.repos.delegated_operation_doc.DelegatedOperationDocument]¶ Get all scheduled operations.
-
get_running_operations
(operator: Optional[str] = None, dataset_name=None) → List[fiftyone.factory.repos.delegated_operation_doc.DelegatedOperationDocument]¶ Get all running operations.
-
list_operations
(operator: Optional[str] = None, dataset_name: Optional[str] = None, dataset_id: Optional[bson.objectid.ObjectId] = None, run_state: Optional[fiftyone.operators.executor.ExecutionRunState] = None, delegation_target: Optional[str] = None, pinned: Optional[bool] = None, paging: Optional[fiftyone.factory.DelegatedOperationPagingParams] = None, search: Optional[dict] = None, **kwargs: Any) → List[fiftyone.factory.repos.delegated_operation_doc.DelegatedOperationDocument]¶ List all operations.
-
delete_operation
(_id: bson.objectid.ObjectId) → fiftyone.factory.repos.delegated_operation_doc.DelegatedOperationDocument¶ Delete an operation.
-
delete_for_dataset
(dataset_id: bson.objectid.ObjectId)¶ Delete an operation.
-
set_pinned
(_id: bson.objectid.ObjectId, pinned: bool = True) → fiftyone.factory.repos.delegated_operation_doc.DelegatedOperationDocument¶ Sets the pinned flag on / off.
-
set_label
(_id: bson.objectid.ObjectId, label: str) → fiftyone.factory.repos.delegated_operation_doc.DelegatedOperationDocument¶ Sets the label for the delegated operation.
-
get
(_id: bson.objectid.ObjectId) → fiftyone.factory.repos.delegated_operation_doc.DelegatedOperationDocument¶ Get an operation by id.
-
count
(filters: Optional[dict] = None, search: Optional[dict] = None) → int¶ Count all operations.
-
-
class
fiftyone.factory.repos.delegated_operation.
MongoDelegatedOperationRepo
(collection: Optional[pymongo.collection.Collection] = None)¶ Bases:
fiftyone.factory.repos.delegated_operation.DelegatedOperationRepo
Attributes:
Methods:
queue_operation
(**kwargs)Queue an operation to be executed by a delegated operator.
set_pinned
(_id[, pinned])Sets the pinned flag on / off.
set_label
(_id, label)Sets the label for the delegated operation.
update_run_state
(_id, run_state[, result, …])Update the run state of an operation.
update_progress
(_id, progress)Update the progress of an operation.
get_queued_operations
([operator, dataset_name])Get all queued operations.
get_scheduled_operations
([operator, …])Get all scheduled operations.
get_running_operations
([operator, dataset_name])Get all running operations.
list_operations
([operator, dataset_name, …])List all operations.
delete_operation
(_id)Delete an operation.
delete_for_dataset
(dataset_id)Delete an operation.
get
(_id)Get an operation by id.
count
([filters, search])Count all operations.
-
COLLECTION_NAME
= 'delegated_ops'¶
-
required_props
= ['operator', 'delegation_target', 'context', 'label']¶
-
queue_operation
(**kwargs: Any) → fiftyone.factory.repos.delegated_operation_doc.DelegatedOperationDocument¶ Queue an operation to be executed by a delegated operator.
-
set_pinned
(_id: bson.objectid.ObjectId, pinned: bool = True) → fiftyone.factory.repos.delegated_operation_doc.DelegatedOperationDocument¶ Sets the pinned flag on / off.
-
set_label
(_id: bson.objectid.ObjectId, label: str) → fiftyone.factory.repos.delegated_operation_doc.DelegatedOperationDocument¶ Sets the label for the delegated operation.
-
update_run_state
(_id: bson.objectid.ObjectId, run_state: fiftyone.operators.executor.ExecutionRunState, result: Optional[fiftyone.operators.executor.ExecutionResult] = None, run_link: Optional[str] = None, progress: Optional[fiftyone.operators.executor.ExecutionProgress] = None) → fiftyone.factory.repos.delegated_operation_doc.DelegatedOperationDocument¶ Update the run state of an operation.
-
update_progress
(_id: bson.objectid.ObjectId, progress: fiftyone.operators.executor.ExecutionProgress) → fiftyone.factory.repos.delegated_operation_doc.DelegatedOperationDocument¶ Update the progress of an operation.
-
get_queued_operations
(operator: Optional[str] = None, dataset_name: Optional[bson.objectid.ObjectId] = None) → List[fiftyone.factory.repos.delegated_operation_doc.DelegatedOperationDocument]¶ Get all queued operations.
-
get_scheduled_operations
(operator: Optional[str] = None, dataset_name: Optional[bson.objectid.ObjectId] = None) → List[fiftyone.factory.repos.delegated_operation_doc.DelegatedOperationDocument]¶ Get all scheduled operations.
-
get_running_operations
(operator: Optional[str] = None, dataset_name: Optional[bson.objectid.ObjectId] = None) → List[fiftyone.factory.repos.delegated_operation_doc.DelegatedOperationDocument]¶ Get all running operations.
-
list_operations
(operator: Optional[str] = None, dataset_name: Optional[str] = None, dataset_id: Optional[bson.objectid.ObjectId] = None, run_state: Optional[fiftyone.operators.executor.ExecutionRunState] = None, delegation_target: Optional[str] = None, pinned: Optional[bool] = None, paging: Optional[fiftyone.factory.DelegatedOperationPagingParams] = None, search: Optional[dict] = None, **kwargs: Any) → List[fiftyone.factory.repos.delegated_operation_doc.DelegatedOperationDocument]¶ List all operations.
-
delete_operation
(_id: bson.objectid.ObjectId) → fiftyone.factory.repos.delegated_operation_doc.DelegatedOperationDocument¶ Delete an operation.
-
delete_for_dataset
(dataset_id: bson.objectid.ObjectId)¶ Delete an operation.
-
get
(_id: bson.objectid.ObjectId) → fiftyone.factory.repos.delegated_operation_doc.DelegatedOperationDocument¶ Get an operation by id.
-
count
(filters: Optional[dict] = None, search: Optional[dict] = None) → int¶ Count all operations.
-