plugins.label_schemas.operators#
Label-schema document operators.
CRUD over fiftyone.core.label_schema_docs — self-contained named
schemas (a label_schema content block + a structured three-tier
visibility block). Mutations are MANAGE-gated; reads require VIEW
(the Explore schema lens and task surfaces read on behalf of every
viewer). The dataset DEFAULT schema is the dataset’s own stored schemas
(all fields active, never hidden) — it is not a doc, so nothing here
marks a default.
Classes:
|
|
|
|
|
Declares a schema's undeclared attributes on the dataset's field schema. |
|
|
|
Creates a doc; |
|
Partial update of name/description/label_schema/visibility. |
|
Deletes a doc. |
|
Fans a newly created dataset field out to every custom schema: annotate-tier content in the schema it was created in (if any), explicit |
- class plugins.label_schemas.operators.ListLabelSchemaDocsOperator(_builtin=False)#
Bases:
Operator{ok, schemas: [{id, name, description, updated_at, version}]}.Attributes:
The
OperatorConfigfor the operator.Whether the operator is builtin.
The effective risk level of the operator, which is used by guardrail systems of an agent to classify tool calls.
The unique identifier of the operator:
plugin_name/operator_name.Methods:
resolve_input(ctx)Returns the resolved input property.
execute(ctx)Executes the operator.
add_secrets(secrets)Adds secrets to the operator.
method_to_uri(method_name)Converts a method name to a URI.
resolve_delegation(ctx)Returns the resolved forced delegation flag.
Returns the resolved execution options.
resolve_output(ctx)Returns the resolved output property.
resolve_placement(ctx)Returns the resolved placement of the operator.
resolve_run_name(ctx)Returns the resolved run name of the operator.
resolve_type(ctx, type)Returns the resolved input or output property.
to_json()Returns a JSON representation of the operator.
- property config#
The
OperatorConfigfor the operator.
- resolve_input(ctx: ExecutionContext)#
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:
- Returns:
a
fiftyone.operators.types.Property, or None
- execute(ctx: ExecutionContext)#
Executes the operator.
Subclasses must implement this method.
- Parameters:
- Returns:
JSON serializable data, or None
- add_secrets(secrets)#
Adds secrets to the operator.
- Parameters:
secrets – a list of secrets
- property builtin#
Whether the operator is builtin.
- method_to_uri(method_name)#
Converts a method name to a URI.
- Parameters:
method_name – the method name
- Returns:
a URI
- property name#
- resolve_delegation(ctx) bool | 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:
- Returns:
whether the operation should be delegated (True), run immediately (False), or None to defer to
resolve_execution_options()to specify the available options
- resolve_execution_options(ctx)#
Returns the resolved execution options.
Subclasses can implement this method to define the execution options available for the operation.
- Parameters:
- Returns:
a
fiftyone.operators.executor.ExecutionOptionsinstance
- resolve_output(ctx)#
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:
- Returns:
a
fiftyone.operators.types.Property, or None
- resolve_placement(ctx)#
Returns the resolved placement of the operator.
Subclasses can implement this method to define the placement of the operator.
- Parameters:
- Returns:
a
fiftyone.operators.types.Placement, or None
- resolve_run_name(ctx)#
Returns the resolved run name of the operator.
Subclasses can implement this method to define the run name of the operator.
- Parameters:
- Returns:
a string, or None
- resolve_type(ctx, type)#
Returns the resolved input or output property.
- Parameters:
type – the type of property to resolve, either
"inputs"or"outputs"
- Returns:
a
fiftyone.operators.types.Property, or None
- property risk_level#
The effective risk level of the operator, which is used by guardrail systems of an agent to classify tool calls.
- to_json()#
Returns a JSON representation of the operator.
- Returns:
a JSON dict
- property uri#
The unique identifier of the operator:
plugin_name/operator_name.
- class plugins.label_schemas.operators.ListUndeclaredLabelSchemaAttributesOperator(_builtin=False)#
Bases:
Operator{ok, undeclared: {path: [attribute names]}}: the attributes a schema defines that the dataset’s field schema has not declared, so the App’s sidebar and filters do not show them. Reads the field schema only; no samples are scanned.Attributes:
The
OperatorConfigfor the operator.Whether the operator is builtin.
The effective risk level of the operator, which is used by guardrail systems of an agent to classify tool calls.
The unique identifier of the operator:
plugin_name/operator_name.Methods:
resolve_input(ctx)Returns the resolved input property.
execute(ctx)Executes the operator.
add_secrets(secrets)Adds secrets to the operator.
method_to_uri(method_name)Converts a method name to a URI.
resolve_delegation(ctx)Returns the resolved forced delegation flag.
Returns the resolved execution options.
resolve_output(ctx)Returns the resolved output property.
resolve_placement(ctx)Returns the resolved placement of the operator.
resolve_run_name(ctx)Returns the resolved run name of the operator.
resolve_type(ctx, type)Returns the resolved input or output property.
to_json()Returns a JSON representation of the operator.
- property config#
The
OperatorConfigfor the operator.
- resolve_input(ctx: ExecutionContext)#
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:
- Returns:
a
fiftyone.operators.types.Property, or None
- execute(ctx: ExecutionContext)#
Executes the operator.
Subclasses must implement this method.
- Parameters:
- Returns:
JSON serializable data, or None
- add_secrets(secrets)#
Adds secrets to the operator.
- Parameters:
secrets – a list of secrets
- property builtin#
Whether the operator is builtin.
- method_to_uri(method_name)#
Converts a method name to a URI.
- Parameters:
method_name – the method name
- Returns:
a URI
- property name#
- resolve_delegation(ctx) bool | 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:
- Returns:
whether the operation should be delegated (True), run immediately (False), or None to defer to
resolve_execution_options()to specify the available options
- resolve_execution_options(ctx)#
Returns the resolved execution options.
Subclasses can implement this method to define the execution options available for the operation.
- Parameters:
- Returns:
a
fiftyone.operators.executor.ExecutionOptionsinstance
- resolve_output(ctx)#
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:
- Returns:
a
fiftyone.operators.types.Property, or None
- resolve_placement(ctx)#
Returns the resolved placement of the operator.
Subclasses can implement this method to define the placement of the operator.
- Parameters:
- Returns:
a
fiftyone.operators.types.Placement, or None
- resolve_run_name(ctx)#
Returns the resolved run name of the operator.
Subclasses can implement this method to define the run name of the operator.
- Parameters:
- Returns:
a string, or None
- resolve_type(ctx, type)#
Returns the resolved input or output property.
- Parameters:
type – the type of property to resolve, either
"inputs"or"outputs"
- Returns:
a
fiftyone.operators.types.Property, or None
- property risk_level#
The effective risk level of the operator, which is used by guardrail systems of an agent to classify tool calls.
- to_json()#
Returns a JSON representation of the operator.
- Returns:
a JSON dict
- property uri#
The unique identifier of the operator:
plugin_name/operator_name.
- class plugins.label_schemas.operators.DeclareLabelSchemaAttributesOperator(_builtin=False)#
Bases:
OperatorDeclares a schema’s undeclared attributes on the dataset’s field schema.
{ok, declared: [paths], skipped: {path: [attribute names]}}; skipped attributes hold values of mixed types and cannot be declared. Scans the values of the attributes it declares.Attributes:
The
OperatorConfigfor the operator.Whether the operator is builtin.
The effective risk level of the operator, which is used by guardrail systems of an agent to classify tool calls.
The unique identifier of the operator:
plugin_name/operator_name.Methods:
resolve_input(ctx)Returns the resolved input property.
execute(ctx)Executes the operator.
add_secrets(secrets)Adds secrets to the operator.
method_to_uri(method_name)Converts a method name to a URI.
resolve_delegation(ctx)Returns the resolved forced delegation flag.
Returns the resolved execution options.
resolve_output(ctx)Returns the resolved output property.
resolve_placement(ctx)Returns the resolved placement of the operator.
resolve_run_name(ctx)Returns the resolved run name of the operator.
resolve_type(ctx, type)Returns the resolved input or output property.
to_json()Returns a JSON representation of the operator.
- property config#
The
OperatorConfigfor the operator.
- resolve_input(ctx: ExecutionContext)#
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:
- Returns:
a
fiftyone.operators.types.Property, or None
- execute(ctx: ExecutionContext)#
Executes the operator.
Subclasses must implement this method.
- Parameters:
- Returns:
JSON serializable data, or None
- add_secrets(secrets)#
Adds secrets to the operator.
- Parameters:
secrets – a list of secrets
- property builtin#
Whether the operator is builtin.
- method_to_uri(method_name)#
Converts a method name to a URI.
- Parameters:
method_name – the method name
- Returns:
a URI
- property name#
- resolve_delegation(ctx) bool | 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:
- Returns:
whether the operation should be delegated (True), run immediately (False), or None to defer to
resolve_execution_options()to specify the available options
- resolve_execution_options(ctx)#
Returns the resolved execution options.
Subclasses can implement this method to define the execution options available for the operation.
- Parameters:
- Returns:
a
fiftyone.operators.executor.ExecutionOptionsinstance
- resolve_output(ctx)#
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:
- Returns:
a
fiftyone.operators.types.Property, or None
- resolve_placement(ctx)#
Returns the resolved placement of the operator.
Subclasses can implement this method to define the placement of the operator.
- Parameters:
- Returns:
a
fiftyone.operators.types.Placement, or None
- resolve_run_name(ctx)#
Returns the resolved run name of the operator.
Subclasses can implement this method to define the run name of the operator.
- Parameters:
- Returns:
a string, or None
- resolve_type(ctx, type)#
Returns the resolved input or output property.
- Parameters:
type – the type of property to resolve, either
"inputs"or"outputs"
- Returns:
a
fiftyone.operators.types.Property, or None
- property risk_level#
The effective risk level of the operator, which is used by guardrail systems of an agent to classify tool calls.
- to_json()#
Returns a JSON representation of the operator.
- Returns:
a JSON dict
- property uri#
The unique identifier of the operator:
plugin_name/operator_name.
- class plugins.label_schemas.operators.GetLabelSchemaDocOperator(_builtin=False)#
Bases:
Operator{ok, schema}— the full doc (label_schema + visibility).include_resolvedadditionally returnsresolved(thefiftyone.core.label_schema_docs.resolve()payload over the dataset’s schema universe) — the Explore “schema lens” consumes itsexcluded_pathsso lens semantics match task semantics exactly.Attributes:
The
OperatorConfigfor the operator.Whether the operator is builtin.
The effective risk level of the operator, which is used by guardrail systems of an agent to classify tool calls.
The unique identifier of the operator:
plugin_name/operator_name.Methods:
resolve_input(ctx)Returns the resolved input property.
execute(ctx)Executes the operator.
add_secrets(secrets)Adds secrets to the operator.
method_to_uri(method_name)Converts a method name to a URI.
resolve_delegation(ctx)Returns the resolved forced delegation flag.
Returns the resolved execution options.
resolve_output(ctx)Returns the resolved output property.
resolve_placement(ctx)Returns the resolved placement of the operator.
resolve_run_name(ctx)Returns the resolved run name of the operator.
resolve_type(ctx, type)Returns the resolved input or output property.
to_json()Returns a JSON representation of the operator.
- property config#
The
OperatorConfigfor the operator.
- resolve_input(ctx: ExecutionContext)#
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:
- Returns:
a
fiftyone.operators.types.Property, or None
- execute(ctx: ExecutionContext)#
Executes the operator.
Subclasses must implement this method.
- Parameters:
- Returns:
JSON serializable data, or None
- add_secrets(secrets)#
Adds secrets to the operator.
- Parameters:
secrets – a list of secrets
- property builtin#
Whether the operator is builtin.
- method_to_uri(method_name)#
Converts a method name to a URI.
- Parameters:
method_name – the method name
- Returns:
a URI
- property name#
- resolve_delegation(ctx) bool | 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:
- Returns:
whether the operation should be delegated (True), run immediately (False), or None to defer to
resolve_execution_options()to specify the available options
- resolve_execution_options(ctx)#
Returns the resolved execution options.
Subclasses can implement this method to define the execution options available for the operation.
- Parameters:
- Returns:
a
fiftyone.operators.executor.ExecutionOptionsinstance
- resolve_output(ctx)#
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:
- Returns:
a
fiftyone.operators.types.Property, or None
- resolve_placement(ctx)#
Returns the resolved placement of the operator.
Subclasses can implement this method to define the placement of the operator.
- Parameters:
- Returns:
a
fiftyone.operators.types.Placement, or None
- resolve_run_name(ctx)#
Returns the resolved run name of the operator.
Subclasses can implement this method to define the run name of the operator.
- Parameters:
- Returns:
a string, or None
- resolve_type(ctx, type)#
Returns the resolved input or output property.
- Parameters:
type – the type of property to resolve, either
"inputs"or"outputs"
- Returns:
a
fiftyone.operators.types.Property, or None
- property risk_level#
The effective risk level of the operator, which is used by guardrail systems of an agent to classify tool calls.
- to_json()#
Returns a JSON representation of the operator.
- Returns:
a JSON dict
- property uri#
The unique identifier of the operator:
plugin_name/operator_name.
- class plugins.label_schemas.operators.CreateLabelSchemaDocOperator(_builtin=False)#
Bases:
OperatorCreates a doc;
from_datasetseedslabel_schemafrom the dataset’s stored per-field schemas (all fields annotate-tier by membership, defaultexplorefor the rest — day-one parity).Attributes:
The
OperatorConfigfor the operator.Whether the operator is builtin.
The effective risk level of the operator, which is used by guardrail systems of an agent to classify tool calls.
The unique identifier of the operator:
plugin_name/operator_name.Methods:
resolve_input(ctx)Returns the resolved input property.
execute(ctx)Executes the operator.
add_secrets(secrets)Adds secrets to the operator.
method_to_uri(method_name)Converts a method name to a URI.
resolve_delegation(ctx)Returns the resolved forced delegation flag.
Returns the resolved execution options.
resolve_output(ctx)Returns the resolved output property.
resolve_placement(ctx)Returns the resolved placement of the operator.
resolve_run_name(ctx)Returns the resolved run name of the operator.
resolve_type(ctx, type)Returns the resolved input or output property.
to_json()Returns a JSON representation of the operator.
- property config#
The
OperatorConfigfor the operator.
- resolve_input(ctx: ExecutionContext)#
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:
- Returns:
a
fiftyone.operators.types.Property, or None
- execute(ctx: ExecutionContext)#
Executes the operator.
Subclasses must implement this method.
- Parameters:
- Returns:
JSON serializable data, or None
- add_secrets(secrets)#
Adds secrets to the operator.
- Parameters:
secrets – a list of secrets
- property builtin#
Whether the operator is builtin.
- method_to_uri(method_name)#
Converts a method name to a URI.
- Parameters:
method_name – the method name
- Returns:
a URI
- property name#
- resolve_delegation(ctx) bool | 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:
- Returns:
whether the operation should be delegated (True), run immediately (False), or None to defer to
resolve_execution_options()to specify the available options
- resolve_execution_options(ctx)#
Returns the resolved execution options.
Subclasses can implement this method to define the execution options available for the operation.
- Parameters:
- Returns:
a
fiftyone.operators.executor.ExecutionOptionsinstance
- resolve_output(ctx)#
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:
- Returns:
a
fiftyone.operators.types.Property, or None
- resolve_placement(ctx)#
Returns the resolved placement of the operator.
Subclasses can implement this method to define the placement of the operator.
- Parameters:
- Returns:
a
fiftyone.operators.types.Placement, or None
- resolve_run_name(ctx)#
Returns the resolved run name of the operator.
Subclasses can implement this method to define the run name of the operator.
- Parameters:
- Returns:
a string, or None
- resolve_type(ctx, type)#
Returns the resolved input or output property.
- Parameters:
type – the type of property to resolve, either
"inputs"or"outputs"
- Returns:
a
fiftyone.operators.types.Property, or None
- property risk_level#
The effective risk level of the operator, which is used by guardrail systems of an agent to classify tool calls.
- to_json()#
Returns a JSON representation of the operator.
- Returns:
a JSON dict
- property uri#
The unique identifier of the operator:
plugin_name/operator_name.
- class plugins.label_schemas.operators.UpdateLabelSchemaDocOperator(_builtin=False)#
Bases:
OperatorPartial update of name/description/label_schema/visibility.
Attributes:
The
OperatorConfigfor the operator.Whether the operator is builtin.
The effective risk level of the operator, which is used by guardrail systems of an agent to classify tool calls.
The unique identifier of the operator:
plugin_name/operator_name.Methods:
resolve_input(ctx)Returns the resolved input property.
execute(ctx)Executes the operator.
add_secrets(secrets)Adds secrets to the operator.
method_to_uri(method_name)Converts a method name to a URI.
resolve_delegation(ctx)Returns the resolved forced delegation flag.
Returns the resolved execution options.
resolve_output(ctx)Returns the resolved output property.
resolve_placement(ctx)Returns the resolved placement of the operator.
resolve_run_name(ctx)Returns the resolved run name of the operator.
resolve_type(ctx, type)Returns the resolved input or output property.
to_json()Returns a JSON representation of the operator.
- property config#
The
OperatorConfigfor the operator.
- resolve_input(ctx: ExecutionContext)#
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:
- Returns:
a
fiftyone.operators.types.Property, or None
- execute(ctx: ExecutionContext)#
Executes the operator.
Subclasses must implement this method.
- Parameters:
- Returns:
JSON serializable data, or None
- add_secrets(secrets)#
Adds secrets to the operator.
- Parameters:
secrets – a list of secrets
- property builtin#
Whether the operator is builtin.
- method_to_uri(method_name)#
Converts a method name to a URI.
- Parameters:
method_name – the method name
- Returns:
a URI
- property name#
- resolve_delegation(ctx) bool | 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:
- Returns:
whether the operation should be delegated (True), run immediately (False), or None to defer to
resolve_execution_options()to specify the available options
- resolve_execution_options(ctx)#
Returns the resolved execution options.
Subclasses can implement this method to define the execution options available for the operation.
- Parameters:
- Returns:
a
fiftyone.operators.executor.ExecutionOptionsinstance
- resolve_output(ctx)#
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:
- Returns:
a
fiftyone.operators.types.Property, or None
- resolve_placement(ctx)#
Returns the resolved placement of the operator.
Subclasses can implement this method to define the placement of the operator.
- Parameters:
- Returns:
a
fiftyone.operators.types.Placement, or None
- resolve_run_name(ctx)#
Returns the resolved run name of the operator.
Subclasses can implement this method to define the run name of the operator.
- Parameters:
- Returns:
a string, or None
- resolve_type(ctx, type)#
Returns the resolved input or output property.
- Parameters:
type – the type of property to resolve, either
"inputs"or"outputs"
- Returns:
a
fiftyone.operators.types.Property, or None
- property risk_level#
The effective risk level of the operator, which is used by guardrail systems of an agent to classify tool calls.
- to_json()#
Returns a JSON representation of the operator.
- Returns:
a JSON dict
- property uri#
The unique identifier of the operator:
plugin_name/operator_name.
- class plugins.label_schemas.operators.DeleteLabelSchemaDocOperator(_builtin=False)#
Bases:
OperatorDeletes a doc. Stages referencing it degrade to unrestricted.
Attributes:
The
OperatorConfigfor the operator.Whether the operator is builtin.
The effective risk level of the operator, which is used by guardrail systems of an agent to classify tool calls.
The unique identifier of the operator:
plugin_name/operator_name.Methods:
resolve_input(ctx)Returns the resolved input property.
execute(ctx)Executes the operator.
add_secrets(secrets)Adds secrets to the operator.
method_to_uri(method_name)Converts a method name to a URI.
resolve_delegation(ctx)Returns the resolved forced delegation flag.
Returns the resolved execution options.
resolve_output(ctx)Returns the resolved output property.
resolve_placement(ctx)Returns the resolved placement of the operator.
resolve_run_name(ctx)Returns the resolved run name of the operator.
resolve_type(ctx, type)Returns the resolved input or output property.
to_json()Returns a JSON representation of the operator.
- property config#
The
OperatorConfigfor the operator.
- resolve_input(ctx: ExecutionContext)#
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:
- Returns:
a
fiftyone.operators.types.Property, or None
- execute(ctx: ExecutionContext)#
Executes the operator.
Subclasses must implement this method.
- Parameters:
- Returns:
JSON serializable data, or None
- add_secrets(secrets)#
Adds secrets to the operator.
- Parameters:
secrets – a list of secrets
- property builtin#
Whether the operator is builtin.
- method_to_uri(method_name)#
Converts a method name to a URI.
- Parameters:
method_name – the method name
- Returns:
a URI
- property name#
- resolve_delegation(ctx) bool | 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:
- Returns:
whether the operation should be delegated (True), run immediately (False), or None to defer to
resolve_execution_options()to specify the available options
- resolve_execution_options(ctx)#
Returns the resolved execution options.
Subclasses can implement this method to define the execution options available for the operation.
- Parameters:
- Returns:
a
fiftyone.operators.executor.ExecutionOptionsinstance
- resolve_output(ctx)#
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:
- Returns:
a
fiftyone.operators.types.Property, or None
- resolve_placement(ctx)#
Returns the resolved placement of the operator.
Subclasses can implement this method to define the placement of the operator.
- Parameters:
- Returns:
a
fiftyone.operators.types.Placement, or None
- resolve_run_name(ctx)#
Returns the resolved run name of the operator.
Subclasses can implement this method to define the run name of the operator.
- Parameters:
- Returns:
a string, or None
- resolve_type(ctx, type)#
Returns the resolved input or output property.
- Parameters:
type – the type of property to resolve, either
"inputs"or"outputs"
- Returns:
a
fiftyone.operators.types.Property, or None
- property risk_level#
The effective risk level of the operator, which is used by guardrail systems of an agent to classify tool calls.
- to_json()#
Returns a JSON representation of the operator.
- Returns:
a JSON dict
- property uri#
The unique identifier of the operator:
plugin_name/operator_name.
- class plugins.label_schemas.operators.PropagateLabelSchemaFieldOperator(_builtin=False)#
Bases:
OperatorFans a newly created dataset field out to every custom schema: annotate-tier content in the schema it was created in (if any), explicit
hiddeneverywhere else. Returns{ok, updated}.Attributes:
The
OperatorConfigfor the operator.Whether the operator is builtin.
The effective risk level of the operator, which is used by guardrail systems of an agent to classify tool calls.
The unique identifier of the operator:
plugin_name/operator_name.Methods:
resolve_input(ctx)Returns the resolved input property.
execute(ctx)Executes the operator.
add_secrets(secrets)Adds secrets to the operator.
method_to_uri(method_name)Converts a method name to a URI.
resolve_delegation(ctx)Returns the resolved forced delegation flag.
Returns the resolved execution options.
resolve_output(ctx)Returns the resolved output property.
resolve_placement(ctx)Returns the resolved placement of the operator.
resolve_run_name(ctx)Returns the resolved run name of the operator.
resolve_type(ctx, type)Returns the resolved input or output property.
to_json()Returns a JSON representation of the operator.
- property config#
The
OperatorConfigfor the operator.
- resolve_input(ctx: ExecutionContext)#
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:
- Returns:
a
fiftyone.operators.types.Property, or None
- execute(ctx: ExecutionContext)#
Executes the operator.
Subclasses must implement this method.
- Parameters:
- Returns:
JSON serializable data, or None
- add_secrets(secrets)#
Adds secrets to the operator.
- Parameters:
secrets – a list of secrets
- property builtin#
Whether the operator is builtin.
- method_to_uri(method_name)#
Converts a method name to a URI.
- Parameters:
method_name – the method name
- Returns:
a URI
- property name#
- resolve_delegation(ctx) bool | 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:
- Returns:
whether the operation should be delegated (True), run immediately (False), or None to defer to
resolve_execution_options()to specify the available options
- resolve_execution_options(ctx)#
Returns the resolved execution options.
Subclasses can implement this method to define the execution options available for the operation.
- Parameters:
- Returns:
a
fiftyone.operators.executor.ExecutionOptionsinstance
- resolve_output(ctx)#
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:
- Returns:
a
fiftyone.operators.types.Property, or None
- resolve_placement(ctx)#
Returns the resolved placement of the operator.
Subclasses can implement this method to define the placement of the operator.
- Parameters:
- Returns:
a
fiftyone.operators.types.Placement, or None
- resolve_run_name(ctx)#
Returns the resolved run name of the operator.
Subclasses can implement this method to define the run name of the operator.
- Parameters:
- Returns:
a string, or None
- resolve_type(ctx, type)#
Returns the resolved input or output property.
- Parameters:
type – the type of property to resolve, either
"inputs"or"outputs"
- Returns:
a
fiftyone.operators.types.Property, or None
- property risk_level#
The effective risk level of the operator, which is used by guardrail systems of an agent to classify tool calls.
- to_json()#
Returns a JSON representation of the operator.
- Returns:
a JSON dict
- property uri#
The unique identifier of the operator:
plugin_name/operator_name.