class documentation

A FiftyOne operator.

Operators represent an operation and the details of how to execute it.

FiftyOne operators contain enough information for a user interface to render a form or button allowing a user to execute the operation.

Method __init__ Undocumented
Method add_secrets Adds secrets to the operator.
Method execute Executes the operator.
Method method_to_uri Converts a method name to a URI.
Method resolve_delegation Returns the resolved forced delegation flag.
Method resolve_execution_options Returns the resolved execution options.
Method resolve_input Returns the resolved input property.
Method resolve_output Returns the resolved output property.
Method resolve_placement Returns the resolved placement of the operator.
Method resolve_type Returns the resolved input or output property.
Method to_json Returns a JSON representation of the operator.
Instance Variable plugin_name Undocumented
Property builtin Whether the operator is builtin.
Property config The OperatorConfig for the operator.
Property name Undocumented
Property uri The unique identifier of the operator: plugin_name/operator_name.
Instance Variable _builtin Undocumented
Instance Variable _plugin_secrets Undocumented
def __init__(self, _builtin=False): (source)

Undocumented

def add_secrets(self, secrets): (source)

Adds secrets to the operator.

Parameters
secretsa list of secrets
def execute(self, ctx): (source)

Executes the operator.

Subclasses must implement this method.

Parameters
ctxthe fiftyone.operators.executor.ExecutionContext
Returns
JSON serializable data, or None
def method_to_uri(self, method_name): (source)

Converts a method name to a URI.

Parameters
method_namethe method name
Returns
a URI
def resolve_delegation(self, ctx): (source)

Returns the resolved forced delegation flag.

Subclasses can implement this method to decide if delegated execution should be forced for the given operation.

Parameters
ctxthe fiftyone.operators.executor.ExecutionContext
Returns
whether the operation should be delegated (True), run immediately (False), or None to defer to resolve_execution_options to specify the available options
def resolve_execution_options(self, ctx): (source)

Returns the resolved execution options.

Subclasses can implement this method to define the execution options available for the operation.

Parameters
ctxthe fiftyone.operators.executor.ExecutionContext
Returns
a fiftyone.operators.executor.ExecutionOptions instance
def resolve_input(self, ctx): (source)

Returns the resolved input property.

Subclasses can implement this method to define the inputs to the operator. This method should never be called directly. Instead use resolve_type.

By default, this method is called once when the operator is created. If the operator is dynamic, this method is called each time the input changes.

Parameters
ctxthe fiftyone.operators.executor.ExecutionContext
Returns
a fiftyone.operators.types.Property, or None
def resolve_output(self, ctx): (source)

Returns the resolved output property.

Subclasses can implement this method to define the outputs of the operator.

By default, this method is called once when the operator is created. If the operator is dynamic, this method is called after the operator is executed.

Parameters
ctxthe fiftyone.operators.executor.ExecutionContext
Returns
a fiftyone.operators.types.Property, or None
def resolve_placement(self, ctx): (source)

Returns the resolved placement of the operator.

Subclasses can implement this method to define the placement of the operator.

Parameters
ctxthe fiftyone.operators.executor.ExecutionContext
Returns
a fiftyone.operators.types.Placement, or None
def resolve_type(self, ctx, type): (source)

Returns the resolved input or output property.

Parameters
ctxthe fiftyone.operators.executor.ExecutionContext
typethe type of property to resolve, either "inputs" or "outputs"
Returns
a fiftyone.operators.types.Property, or None
def to_json(self): (source)

Returns a JSON representation of the operator.

Returns
a JSON dict
plugin_name = (source)

Undocumented

Whether the operator is builtin.

The OperatorConfig for the operator.

Undocumented

The unique identifier of the operator: plugin_name/operator_name.

_builtin = (source)

Undocumented

_plugin_secrets: list = (source)

Undocumented