fiftyone.factory.repos.delegated_operation#

FiftyOne delegated operation repository.

Copyright 2017-2025, Voxel51, Inc.

Classes:

DelegatedOperationRepo()

Base Class for a delegated operation repository.

MongoDelegatedOperationRepo([collection])

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.

set_log_upload_error(_id, log_upload_error)

Sets the log upload error for the delegated operation.

set_log_size(_id, log_size)

Sets the log size for the delegated operation.

get(_id)

Get an operation by id.

count([filters, search])

Count all operations.

queue_operation(**kwargs: Any) DelegatedOperationDocument#

Queue an operation to be executed by a delegated operator.

update_run_state(_id: ObjectId, run_state: ExecutionRunState, result: ExecutionResult = None, run_link: str = None, log_path: str = None, progress: ExecutionProgress = None, required_state: ExecutionRunState = None) DelegatedOperationDocument#

Update the run state of an operation.

update_progress(_id: ObjectId, progress: ExecutionProgress) DelegatedOperationDocument#

Update the progress of an operation.

get_queued_operations(operator: str = None, dataset_name=None) List[DelegatedOperationDocument]#

Get all queued operations.

get_scheduled_operations(operator: str = None, dataset_name=None) List[DelegatedOperationDocument]#

Get all scheduled operations.

get_running_operations(operator: str = None, dataset_name=None) List[DelegatedOperationDocument]#

Get all running operations.

list_operations(operator: str = None, dataset_name: str = None, dataset_id: ObjectId = None, run_state: ExecutionRunState = None, delegation_target: str = None, pinned: bool = None, paging: DelegatedOperationPagingParams = None, search: dict = None, **kwargs: Any) List[DelegatedOperationDocument]#

List all operations.

delete_operation(_id: ObjectId) DelegatedOperationDocument#

Delete an operation.

delete_for_dataset(dataset_id: ObjectId)#

Delete an operation.

set_pinned(_id: ObjectId, pinned: bool = True) DelegatedOperationDocument#

Sets the pinned flag on / off.

set_label(_id: ObjectId, label: str) DelegatedOperationDocument#

Sets the label for the delegated operation.

set_log_upload_error(_id: ObjectId, log_upload_error: str) DelegatedOperationDocument#

Sets the log upload error for the delegated operation.

set_log_size(_id: ObjectId, log_size: int) DelegatedOperationDocument#

Sets the log size for the delegated operation.

get(_id: ObjectId) DelegatedOperationDocument#

Get an operation by id.

count(filters: dict = None, search: dict = None) int#

Count all operations.

class fiftyone.factory.repos.delegated_operation.MongoDelegatedOperationRepo(collection: Collection = None)#

Bases: 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.

set_log_upload_error(_id, log_upload_error)

Sets the log upload error for the delegated operation.

set_log_size(_id, log_size)

Sets the log size 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) DelegatedOperationDocument#

Queue an operation to be executed by a delegated operator.

set_pinned(_id: ObjectId, pinned: bool = True) DelegatedOperationDocument#

Sets the pinned flag on / off.

set_label(_id: ObjectId, label: str) DelegatedOperationDocument#

Sets the label for the delegated operation.

set_log_upload_error(_id: ObjectId, log_upload_error: str) DelegatedOperationDocument#

Sets the log upload error for the delegated operation.

set_log_size(_id: ObjectId, log_size: int) DelegatedOperationDocument#

Sets the log size for the delegated operation.

update_run_state(_id: ObjectId, run_state: ExecutionRunState, result: ExecutionResult = None, run_link: str = None, log_path: str = None, progress: ExecutionProgress = None, required_state: ExecutionRunState = None) DelegatedOperationDocument#

Update the run state of an operation.

update_progress(_id: ObjectId, progress: ExecutionProgress) DelegatedOperationDocument#

Update the progress of an operation.

get_queued_operations(operator: str = None, dataset_name: ObjectId = None) List[DelegatedOperationDocument]#

Get all queued operations.

get_scheduled_operations(operator: str = None, dataset_name: ObjectId = None) List[DelegatedOperationDocument]#

Get all scheduled operations.

get_running_operations(operator: str = None, dataset_name: ObjectId = None) List[DelegatedOperationDocument]#

Get all running operations.

list_operations(operator: str = None, dataset_name: str = None, dataset_id: ObjectId = None, run_state: ExecutionRunState = None, delegation_target: str = None, pinned: bool = None, paging: DelegatedOperationPagingParams = None, search: dict = None, **kwargs: Any) List[DelegatedOperationDocument]#

List all operations.

delete_operation(_id: ObjectId) DelegatedOperationDocument#

Delete an operation.

delete_for_dataset(dataset_id: ObjectId)#

Delete an operation.

get(_id: ObjectId) DelegatedOperationDocument#

Get an operation by id.

count(filters: dict = None, search: dict = None) int#

Count all operations.