class Operator(object): (source)
Known subclasses: fiftyone.operators.evaluation_metric.EvaluationMetric
, fiftyone.operators.panel.Panel
Constructor: Operator(_builtin)
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 |
Adds secrets to the operator. |
Method | execute |
Executes the operator. |
Method | method |
Converts a method name to a URI. |
Method | resolve |
Returns the resolved forced delegation flag. |
Method | resolve |
Returns the resolved execution options. |
Method | resolve |
Returns the resolved input property. |
Method | resolve |
Returns the resolved output property. |
Method | resolve |
Returns the resolved placement of the operator. |
Method | resolve |
Returns the resolved input or output property. |
Method | to |
Returns a JSON representation of the operator. |
Instance Variable | plugin |
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 |
Undocumented |
fiftyone.operators.panel.Panel
Executes the operator.
Subclasses must implement this method.
Parameters | |
ctx | the fiftyone.operators.executor.ExecutionContext |
Returns | |
JSON serializable data, or None |
Returns the resolved forced delegation flag.
Subclasses can implement this method to decide if delegated execution should be forced for the given operation.
Parameters | |
ctx | the 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 |
Returns the resolved execution options.
Subclasses can implement this method to define the execution options available for the operation.
Parameters | |
ctx | the fiftyone.operators.executor.ExecutionContext |
Returns | |
a fiftyone.operators.executor.ExecutionOptions instance |
fiftyone.operators.panel.Panel
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 | |
ctx | the fiftyone.operators.executor.ExecutionContext |
Returns | |
a fiftyone.operators.types.Property , or None |
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 | |
ctx | the fiftyone.operators.executor.ExecutionContext |
Returns | |
a fiftyone.operators.types.Property , or None |
Returns the resolved placement of the operator.
Subclasses can implement this method to define the placement of the operator.
Parameters | |
ctx | the fiftyone.operators.executor.ExecutionContext |
Returns | |
a fiftyone.operators.types.Placement , or None |
Returns the resolved input or output property.
Parameters | |
ctx | the fiftyone.operators.executor.ExecutionContext |
type | the type of property to resolve, either "inputs" or "outputs" |
Returns | |
a fiftyone.operators.types.Property , or None |