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.

Copyright 2017-2026, Voxel51, Inc.

Classes:

ListLabelSchemaDocsOperator([_builtin])

{ok, schemas: [{id, name, description, updated_at, version}]}.

ListUndeclaredLabelSchemaAttributesOperator([...])

{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.

DeclareLabelSchemaAttributesOperator([_builtin])

Declares a schema's undeclared attributes on the dataset's field schema.

GetLabelSchemaDocOperator([_builtin])

{ok, schema} — the full doc (label_schema + visibility).

CreateLabelSchemaDocOperator([_builtin])

Creates a doc; from_dataset seeds label_schema from the dataset's stored per-field schemas (all fields annotate-tier by membership, default explore for the rest — day-one parity).

UpdateLabelSchemaDocOperator([_builtin])

Partial update of name/description/label_schema/visibility.

DeleteLabelSchemaDocOperator([_builtin])

Deletes a doc.

PropagateLabelSchemaFieldOperator([_builtin])

Fans a newly created dataset field out to every custom schema: annotate-tier content in the schema it was created in (if any), explicit hidden everywhere else.

class plugins.label_schemas.operators.ListLabelSchemaDocsOperator(_builtin=False)#

Bases: Operator

{ok, schemas: [{id, name, description, updated_at, version}]}.

Attributes:

config

The OperatorConfig for the operator.

builtin

Whether the operator is builtin.

name

risk_level

The effective risk level of the operator, which is used by guardrail systems of an agent to classify tool calls.

uri

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.

resolve_execution_options(ctx)

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 OperatorConfig for 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:

ctx – the fiftyone.operators.executor.ExecutionContext

Returns:

a fiftyone.operators.types.Property, or None

execute(ctx: ExecutionContext)#

Executes the operator.

Subclasses must implement this method.

Parameters:

ctx – the fiftyone.operators.executor.ExecutionContext

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:

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

resolve_execution_options(ctx)#

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

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:

ctx – the fiftyone.operators.executor.ExecutionContext

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:

ctx – the fiftyone.operators.executor.ExecutionContext

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:

ctx – the fiftyone.operators.executor.ExecutionContext

Returns:

a string, or None

resolve_type(ctx, type)#

Returns the resolved input or output property.

Parameters:
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:

config

The OperatorConfig for the operator.

builtin

Whether the operator is builtin.

name

risk_level

The effective risk level of the operator, which is used by guardrail systems of an agent to classify tool calls.

uri

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.

resolve_execution_options(ctx)

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 OperatorConfig for 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:

ctx – the fiftyone.operators.executor.ExecutionContext

Returns:

a fiftyone.operators.types.Property, or None

execute(ctx: ExecutionContext)#

Executes the operator.

Subclasses must implement this method.

Parameters:

ctx – the fiftyone.operators.executor.ExecutionContext

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:

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

resolve_execution_options(ctx)#

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

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:

ctx – the fiftyone.operators.executor.ExecutionContext

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:

ctx – the fiftyone.operators.executor.ExecutionContext

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:

ctx – the fiftyone.operators.executor.ExecutionContext

Returns:

a string, or None

resolve_type(ctx, type)#

Returns the resolved input or output property.

Parameters:
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: Operator

Declares 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:

config

The OperatorConfig for the operator.

builtin

Whether the operator is builtin.

name

risk_level

The effective risk level of the operator, which is used by guardrail systems of an agent to classify tool calls.

uri

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.

resolve_execution_options(ctx)

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 OperatorConfig for 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:

ctx – the fiftyone.operators.executor.ExecutionContext

Returns:

a fiftyone.operators.types.Property, or None

execute(ctx: ExecutionContext)#

Executes the operator.

Subclasses must implement this method.

Parameters:

ctx – the fiftyone.operators.executor.ExecutionContext

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:

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

resolve_execution_options(ctx)#

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

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:

ctx – the fiftyone.operators.executor.ExecutionContext

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:

ctx – the fiftyone.operators.executor.ExecutionContext

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:

ctx – the fiftyone.operators.executor.ExecutionContext

Returns:

a string, or None

resolve_type(ctx, type)#

Returns the resolved input or output property.

Parameters:
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_resolved additionally returns resolved (the fiftyone.core.label_schema_docs.resolve() payload over the dataset’s schema universe) — the Explore “schema lens” consumes its excluded_paths so lens semantics match task semantics exactly.

Attributes:

config

The OperatorConfig for the operator.

builtin

Whether the operator is builtin.

name

risk_level

The effective risk level of the operator, which is used by guardrail systems of an agent to classify tool calls.

uri

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.

resolve_execution_options(ctx)

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 OperatorConfig for 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:

ctx – the fiftyone.operators.executor.ExecutionContext

Returns:

a fiftyone.operators.types.Property, or None

execute(ctx: ExecutionContext)#

Executes the operator.

Subclasses must implement this method.

Parameters:

ctx – the fiftyone.operators.executor.ExecutionContext

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:

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

resolve_execution_options(ctx)#

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

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:

ctx – the fiftyone.operators.executor.ExecutionContext

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:

ctx – the fiftyone.operators.executor.ExecutionContext

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:

ctx – the fiftyone.operators.executor.ExecutionContext

Returns:

a string, or None

resolve_type(ctx, type)#

Returns the resolved input or output property.

Parameters:
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: Operator

Creates a doc; from_dataset seeds label_schema from the dataset’s stored per-field schemas (all fields annotate-tier by membership, default explore for the rest — day-one parity).

Attributes:

config

The OperatorConfig for the operator.

builtin

Whether the operator is builtin.

name

risk_level

The effective risk level of the operator, which is used by guardrail systems of an agent to classify tool calls.

uri

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.

resolve_execution_options(ctx)

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 OperatorConfig for 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:

ctx – the fiftyone.operators.executor.ExecutionContext

Returns:

a fiftyone.operators.types.Property, or None

execute(ctx: ExecutionContext)#

Executes the operator.

Subclasses must implement this method.

Parameters:

ctx – the fiftyone.operators.executor.ExecutionContext

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:

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

resolve_execution_options(ctx)#

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

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:

ctx – the fiftyone.operators.executor.ExecutionContext

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:

ctx – the fiftyone.operators.executor.ExecutionContext

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:

ctx – the fiftyone.operators.executor.ExecutionContext

Returns:

a string, or None

resolve_type(ctx, type)#

Returns the resolved input or output property.

Parameters:
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: Operator

Partial update of name/description/label_schema/visibility.

Attributes:

config

The OperatorConfig for the operator.

builtin

Whether the operator is builtin.

name

risk_level

The effective risk level of the operator, which is used by guardrail systems of an agent to classify tool calls.

uri

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.

resolve_execution_options(ctx)

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 OperatorConfig for 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:

ctx – the fiftyone.operators.executor.ExecutionContext

Returns:

a fiftyone.operators.types.Property, or None

execute(ctx: ExecutionContext)#

Executes the operator.

Subclasses must implement this method.

Parameters:

ctx – the fiftyone.operators.executor.ExecutionContext

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:

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

resolve_execution_options(ctx)#

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

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:

ctx – the fiftyone.operators.executor.ExecutionContext

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:

ctx – the fiftyone.operators.executor.ExecutionContext

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:

ctx – the fiftyone.operators.executor.ExecutionContext

Returns:

a string, or None

resolve_type(ctx, type)#

Returns the resolved input or output property.

Parameters:
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: Operator

Deletes a doc. Stages referencing it degrade to unrestricted.

Attributes:

config

The OperatorConfig for the operator.

builtin

Whether the operator is builtin.

name

risk_level

The effective risk level of the operator, which is used by guardrail systems of an agent to classify tool calls.

uri

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.

resolve_execution_options(ctx)

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 OperatorConfig for 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:

ctx – the fiftyone.operators.executor.ExecutionContext

Returns:

a fiftyone.operators.types.Property, or None

execute(ctx: ExecutionContext)#

Executes the operator.

Subclasses must implement this method.

Parameters:

ctx – the fiftyone.operators.executor.ExecutionContext

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:

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

resolve_execution_options(ctx)#

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

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:

ctx – the fiftyone.operators.executor.ExecutionContext

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:

ctx – the fiftyone.operators.executor.ExecutionContext

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:

ctx – the fiftyone.operators.executor.ExecutionContext

Returns:

a string, or None

resolve_type(ctx, type)#

Returns the resolved input or output property.

Parameters:
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: Operator

Fans a newly created dataset field out to every custom schema: annotate-tier content in the schema it was created in (if any), explicit hidden everywhere else. Returns {ok, updated}.

Attributes:

config

The OperatorConfig for the operator.

builtin

Whether the operator is builtin.

name

risk_level

The effective risk level of the operator, which is used by guardrail systems of an agent to classify tool calls.

uri

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.

resolve_execution_options(ctx)

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 OperatorConfig for 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:

ctx – the fiftyone.operators.executor.ExecutionContext

Returns:

a fiftyone.operators.types.Property, or None

execute(ctx: ExecutionContext)#

Executes the operator.

Subclasses must implement this method.

Parameters:

ctx – the fiftyone.operators.executor.ExecutionContext

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:

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

resolve_execution_options(ctx)#

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

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:

ctx – the fiftyone.operators.executor.ExecutionContext

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:

ctx – the fiftyone.operators.executor.ExecutionContext

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:

ctx – the fiftyone.operators.executor.ExecutionContext

Returns:

a string, or None

resolve_type(ctx, type)#

Returns the resolved input or output property.

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