module documentation

FiftyOne operator execution.

Copyright 2017-2025, Voxel51, Inc.

Class ExecutionContext Represents the execution context of an operator.
Class ExecutionOptions Represents the execution options of an operation.
Class ExecutionProgress Represents the status of an operator execution.
Class ExecutionResult Represents the result of an operator execution.
Class ExecutionRunState Enumeration of the available operator run states.
Class Executor Handles the execution phase of the operator lifecycle.
Class InvocationRequest Represents a request to invoke an operator.
Class ValidationContext Represents the validation context of an operator.
Class ValidationError A validation error.
Exception ExecutionError An error that occurs while executing an operator.
Async Function do_execute_operator Undocumented
Function execute_operator Executes the operator with the given name.
Async Function execute_or_delegate_operator Executes the operator with the given name.
Async Function prepare_operator_executor Undocumented
Async Function resolve_execution_options Resolves the execution options of the operator with the given name.
Function resolve_placement Resolves the placement of the operator with the given name.
Async Function resolve_type Resolves the inputs property type of the operator with the given name.
Async Function resolve_type_with_context Resolves the "inputs" or "outputs" schema of an operator with the given context.
Variable logger Undocumented
Function _convert_callables_to_operator_uris Undocumented
Function _parse_ctx Undocumented
async def do_execute_operator(operator, ctx, exhaust=False): (source)

Undocumented

def execute_operator(operator_uri, ctx=None, **kwargs): (source)

Executes the operator with the given name.

Parameters
operator_urithe URI of the operator
ctx:None

a dictionary of parameters defining the execution context. The supported keys are:

  • dataset: a fiftyone.core.dataset.Dataset or the name of a dataset to process. This is required unless a view is provided
  • view (None): an optional fiftyone.core.view.DatasetView to process
  • selected ([]): an optional list of selected sample IDs
  • selected_labels ([]): an optional list of selected labels in the format returned by fiftyone.core.session.Session.selected_labels
  • current_sample (None): an optional ID of the current sample being processed
  • params: a dictionary of parameters for the operator. Consult the operator's documentation for details
  • request_delegation (False): whether to request delegated execution, if supported by the operator
  • delegation_target (None): an optional orchestrator on which to schedule the operation, if it is delegated
**kwargsyou can optionally provide any of the supported ctx keys as keyword arguments rather than including them in ctx
Returns
an ExecutionResult, or an asyncio.Task if you run this method in a notebook context
Raises
ExecutionErrorif an error occurred while immediately executing an operation or scheduling a delegated operation
@coroutine_timeout(seconds=fo.config.operator_timeout)
async def execute_or_delegate_operator(operator_uri, request_params, exhaust=False): (source)

Executes the operator with the given name.

Parameters
operator_urithe URI of the operator
request_paramsa dictionary of parameters for the operator
exhaust:Falsewhether to immediately exhaust generator operators
Returns
an ExecutionResult
async def prepare_operator_executor(operator_uri, request_params, set_progress=None, delegated_operation_id=None): (source)

Undocumented

async def resolve_execution_options(registry, operator_uri, request_params): (source)

Resolves the execution options of the operator with the given name.

Parameters
registryan fiftyone.operators.registry.OperatorRegistry
operator_urithe URI of the operator
request_paramsa dictionary of request parameters
Returns
a fiftyone.operators.executor.ExecutionOptions or None
def resolve_placement(operator, request_params): (source)

Resolves the placement of the operator with the given name.

Parameters
operatorthe fiftyone.operators.operator.Operator
request_paramsa dictionary of request parameters
Returns
the placement of the operator or None
async def resolve_type(registry, operator_uri, request_params): (source)

Resolves the inputs property type of the operator with the given name.

Parameters
registryan fiftyone.operators.registry.OperatorRegistry
operator_urithe URI of the operator
request_paramsa dictionary of request parameters
Returns
the type of the inputs fiftyone.operators.types.Property of the operator, or None
async def resolve_type_with_context(operator, context): (source)

Resolves the "inputs" or "outputs" schema of an operator with the given context.

Parameters
operatorthe fiftyone.operators.Operator
contextthe ExecutionContext of an operator
Returns
the "inputs" or "outputs" schema fiftyone.operators.types.Property of an operator, or None

Undocumented

def _convert_callables_to_operator_uris(d): (source)

Undocumented

def _parse_ctx(ctx=None, **kwargs): (source)

Undocumented