fiftyone.operators.builtin¶
Builtin operators.
Classes:
|
|
|
|
|
|
|
|
|
|
|
|
|
Functions:
|
|
-
class
fiftyone.operators.builtin.
CloneSelectedSamples
(_builtin=False)¶ Bases:
fiftyone.operators.operator.Operator
Methods:
add_secrets
(secrets)Adds secrets to the operator.
execute
(ctx)Executes the operator.
resolve_definition
(resolve_dynamic, ctx)Returns a resolved definition of the operator.
resolve_delegation
(ctx)Returns the resolved delegation flag.
resolve_input
(ctx)Returns the resolved input property.
resolve_output
(ctx)Returns the resolved output property.
resolve_placement
(ctx)Returns the resolved placement of the operator.
resolve_type
(ctx, type)Returns the resolved input or output property.
to_json
(ctx[, resolve_dynamic])Returns a JSON representation of the operator.
Attributes:
Whether the operator is builtin.
The
OperatorConfig
for the operator.The unique identifier of the operator:
plugin_name/operator_name
.-
property
config
¶ The
OperatorConfig
for the operator.
-
resolve_input
(ctx)¶ 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)¶ Executes the operator.
Subclasses must implement this method.
- Parameters
-
add_secrets
(secrets)¶ Adds secrets to the operator.
- Parameters
secrets – a list of secrets
-
property
builtin
¶ Whether the operator is builtin.
-
property
delegation_target
¶
-
property
name
¶
-
resolve_definition
(resolve_dynamic, ctx)¶ Returns a resolved definition of the operator.
The resolved definition is a clone of the default definition using
resolve_input()
andresolve_output()
to resolve the inputs and output properties of the operator.Passing
resolve_dynamic=False
allows resolution of dynamic operators to be deferred to execution time. If the operatoris_dyanmic
andresolve_dynamic
is False, a clone of default definition is returned.- Parameters
resolve_dynamic – whether to resolve dynamic inputs and outputs
- Returns
a definition
fiftyone.operators.types.Object
-
resolve_delegation
(ctx) → bool¶ Returns the resolved delegation flag.
Subclasses can implement this method to define the logic which decides if the operation should be queued for delegation
- Parameters
- Returns
a boolean
-
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_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
-
to_json
(ctx, resolve_dynamic=False)¶ Returns a JSON representation of the operator.
- Parameters
resolve_dynamic (False) – whether to resolve dynamic inputs and outputs
- Returns
a JSON dict
-
property
uri
¶ The unique identifier of the operator:
plugin_name/operator_name
.
-
property
-
class
fiftyone.operators.builtin.
CloneSampleField
(_builtin=False)¶ Bases:
fiftyone.operators.operator.Operator
Methods:
add_secrets
(secrets)Adds secrets to the operator.
execute
(ctx)Executes the operator.
resolve_definition
(resolve_dynamic, ctx)Returns a resolved definition of the operator.
resolve_delegation
(ctx)Returns the resolved delegation flag.
resolve_input
(ctx)Returns the resolved input property.
resolve_output
(ctx)Returns the resolved output property.
resolve_placement
(ctx)Returns the resolved placement of the operator.
resolve_type
(ctx, type)Returns the resolved input or output property.
to_json
(ctx[, resolve_dynamic])Returns a JSON representation of the operator.
Attributes:
Whether the operator is builtin.
The
OperatorConfig
for the operator.The unique identifier of the operator:
plugin_name/operator_name
.-
property
config
¶ The
OperatorConfig
for the operator.
-
resolve_input
(ctx)¶ 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)¶ Executes the operator.
Subclasses must implement this method.
- Parameters
-
add_secrets
(secrets)¶ Adds secrets to the operator.
- Parameters
secrets – a list of secrets
-
property
builtin
¶ Whether the operator is builtin.
-
property
delegation_target
¶
-
property
name
¶
-
resolve_definition
(resolve_dynamic, ctx)¶ Returns a resolved definition of the operator.
The resolved definition is a clone of the default definition using
resolve_input()
andresolve_output()
to resolve the inputs and output properties of the operator.Passing
resolve_dynamic=False
allows resolution of dynamic operators to be deferred to execution time. If the operatoris_dyanmic
andresolve_dynamic
is False, a clone of default definition is returned.- Parameters
resolve_dynamic – whether to resolve dynamic inputs and outputs
- Returns
a definition
fiftyone.operators.types.Object
-
resolve_delegation
(ctx) → bool¶ Returns the resolved delegation flag.
Subclasses can implement this method to define the logic which decides if the operation should be queued for delegation
- Parameters
- Returns
a boolean
-
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_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
-
to_json
(ctx, resolve_dynamic=False)¶ Returns a JSON representation of the operator.
- Parameters
resolve_dynamic (False) – whether to resolve dynamic inputs and outputs
- Returns
a JSON dict
-
property
uri
¶ The unique identifier of the operator:
plugin_name/operator_name
.
-
property
-
class
fiftyone.operators.builtin.
RenameSampleField
(_builtin=False)¶ Bases:
fiftyone.operators.operator.Operator
Methods:
add_secrets
(secrets)Adds secrets to the operator.
execute
(ctx)Executes the operator.
resolve_definition
(resolve_dynamic, ctx)Returns a resolved definition of the operator.
resolve_delegation
(ctx)Returns the resolved delegation flag.
resolve_input
(ctx)Returns the resolved input property.
resolve_output
(ctx)Returns the resolved output property.
resolve_placement
(ctx)Returns the resolved placement of the operator.
resolve_type
(ctx, type)Returns the resolved input or output property.
to_json
(ctx[, resolve_dynamic])Returns a JSON representation of the operator.
Attributes:
Whether the operator is builtin.
The
OperatorConfig
for the operator.The unique identifier of the operator:
plugin_name/operator_name
.-
property
config
¶ The
OperatorConfig
for the operator.
-
resolve_input
(ctx)¶ 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)¶ Executes the operator.
Subclasses must implement this method.
- Parameters
-
add_secrets
(secrets)¶ Adds secrets to the operator.
- Parameters
secrets – a list of secrets
-
property
builtin
¶ Whether the operator is builtin.
-
property
delegation_target
¶
-
property
name
¶
-
resolve_definition
(resolve_dynamic, ctx)¶ Returns a resolved definition of the operator.
The resolved definition is a clone of the default definition using
resolve_input()
andresolve_output()
to resolve the inputs and output properties of the operator.Passing
resolve_dynamic=False
allows resolution of dynamic operators to be deferred to execution time. If the operatoris_dyanmic
andresolve_dynamic
is False, a clone of default definition is returned.- Parameters
resolve_dynamic – whether to resolve dynamic inputs and outputs
- Returns
a definition
fiftyone.operators.types.Object
-
resolve_delegation
(ctx) → bool¶ Returns the resolved delegation flag.
Subclasses can implement this method to define the logic which decides if the operation should be queued for delegation
- Parameters
- Returns
a boolean
-
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_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
-
to_json
(ctx, resolve_dynamic=False)¶ Returns a JSON representation of the operator.
- Parameters
resolve_dynamic (False) – whether to resolve dynamic inputs and outputs
- Returns
a JSON dict
-
property
uri
¶ The unique identifier of the operator:
plugin_name/operator_name
.
-
property
-
class
fiftyone.operators.builtin.
DeleteSelectedSamples
(_builtin=False)¶ Bases:
fiftyone.operators.operator.Operator
Methods:
add_secrets
(secrets)Adds secrets to the operator.
execute
(ctx)Executes the operator.
resolve_definition
(resolve_dynamic, ctx)Returns a resolved definition of the operator.
resolve_delegation
(ctx)Returns the resolved delegation flag.
resolve_input
(ctx)Returns the resolved input property.
resolve_output
(ctx)Returns the resolved output property.
resolve_placement
(ctx)Returns the resolved placement of the operator.
resolve_type
(ctx, type)Returns the resolved input or output property.
to_json
(ctx[, resolve_dynamic])Returns a JSON representation of the operator.
Attributes:
Whether the operator is builtin.
The
OperatorConfig
for the operator.The unique identifier of the operator:
plugin_name/operator_name
.-
property
config
¶ The
OperatorConfig
for the operator.
-
resolve_input
(ctx)¶ 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)¶ Executes the operator.
Subclasses must implement this method.
- Parameters
-
add_secrets
(secrets)¶ Adds secrets to the operator.
- Parameters
secrets – a list of secrets
-
property
builtin
¶ Whether the operator is builtin.
-
property
delegation_target
¶
-
property
name
¶
-
resolve_definition
(resolve_dynamic, ctx)¶ Returns a resolved definition of the operator.
The resolved definition is a clone of the default definition using
resolve_input()
andresolve_output()
to resolve the inputs and output properties of the operator.Passing
resolve_dynamic=False
allows resolution of dynamic operators to be deferred to execution time. If the operatoris_dyanmic
andresolve_dynamic
is False, a clone of default definition is returned.- Parameters
resolve_dynamic – whether to resolve dynamic inputs and outputs
- Returns
a definition
fiftyone.operators.types.Object
-
resolve_delegation
(ctx) → bool¶ Returns the resolved delegation flag.
Subclasses can implement this method to define the logic which decides if the operation should be queued for delegation
- Parameters
- Returns
a boolean
-
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_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
-
to_json
(ctx, resolve_dynamic=False)¶ Returns a JSON representation of the operator.
- Parameters
resolve_dynamic (False) – whether to resolve dynamic inputs and outputs
- Returns
a JSON dict
-
property
uri
¶ The unique identifier of the operator:
plugin_name/operator_name
.
-
property
-
class
fiftyone.operators.builtin.
DeleteSampleField
(_builtin=False)¶ Bases:
fiftyone.operators.operator.Operator
Methods:
add_secrets
(secrets)Adds secrets to the operator.
execute
(ctx)Executes the operator.
resolve_definition
(resolve_dynamic, ctx)Returns a resolved definition of the operator.
resolve_delegation
(ctx)Returns the resolved delegation flag.
resolve_input
(ctx)Returns the resolved input property.
resolve_output
(ctx)Returns the resolved output property.
resolve_placement
(ctx)Returns the resolved placement of the operator.
resolve_type
(ctx, type)Returns the resolved input or output property.
to_json
(ctx[, resolve_dynamic])Returns a JSON representation of the operator.
Attributes:
Whether the operator is builtin.
The
OperatorConfig
for the operator.The unique identifier of the operator:
plugin_name/operator_name
.-
property
config
¶ The
OperatorConfig
for the operator.
-
resolve_input
(ctx)¶ 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)¶ Executes the operator.
Subclasses must implement this method.
- Parameters
-
add_secrets
(secrets)¶ Adds secrets to the operator.
- Parameters
secrets – a list of secrets
-
property
builtin
¶ Whether the operator is builtin.
-
property
delegation_target
¶
-
property
name
¶
-
resolve_definition
(resolve_dynamic, ctx)¶ Returns a resolved definition of the operator.
The resolved definition is a clone of the default definition using
resolve_input()
andresolve_output()
to resolve the inputs and output properties of the operator.Passing
resolve_dynamic=False
allows resolution of dynamic operators to be deferred to execution time. If the operatoris_dyanmic
andresolve_dynamic
is False, a clone of default definition is returned.- Parameters
resolve_dynamic – whether to resolve dynamic inputs and outputs
- Returns
a definition
fiftyone.operators.types.Object
-
resolve_delegation
(ctx) → bool¶ Returns the resolved delegation flag.
Subclasses can implement this method to define the logic which decides if the operation should be queued for delegation
- Parameters
- Returns
a boolean
-
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_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
-
to_json
(ctx, resolve_dynamic=False)¶ Returns a JSON representation of the operator.
- Parameters
resolve_dynamic (False) – whether to resolve dynamic inputs and outputs
- Returns
a JSON dict
-
property
uri
¶ The unique identifier of the operator:
plugin_name/operator_name
.
-
property
-
class
fiftyone.operators.builtin.
PrintStdout
(_builtin=False)¶ Bases:
fiftyone.operators.operator.Operator
Methods:
add_secrets
(secrets)Adds secrets to the operator.
execute
(ctx)Executes the operator.
resolve_definition
(resolve_dynamic, ctx)Returns a resolved definition of the operator.
resolve_delegation
(ctx)Returns the resolved delegation flag.
resolve_input
(ctx)Returns the resolved input property.
resolve_output
(ctx)Returns the resolved output property.
resolve_placement
(ctx)Returns the resolved placement of the operator.
resolve_type
(ctx, type)Returns the resolved input or output property.
to_json
(ctx[, resolve_dynamic])Returns a JSON representation of the operator.
Attributes:
Whether the operator is builtin.
The
OperatorConfig
for the operator.The unique identifier of the operator:
plugin_name/operator_name
.-
property
config
¶ The
OperatorConfig
for the operator.
-
resolve_input
(ctx)¶ 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)¶ Executes the operator.
Subclasses must implement this method.
- Parameters
-
add_secrets
(secrets)¶ Adds secrets to the operator.
- Parameters
secrets – a list of secrets
-
property
builtin
¶ Whether the operator is builtin.
-
property
delegation_target
¶
-
property
name
¶
-
resolve_definition
(resolve_dynamic, ctx)¶ Returns a resolved definition of the operator.
The resolved definition is a clone of the default definition using
resolve_input()
andresolve_output()
to resolve the inputs and output properties of the operator.Passing
resolve_dynamic=False
allows resolution of dynamic operators to be deferred to execution time. If the operatoris_dyanmic
andresolve_dynamic
is False, a clone of default definition is returned.- Parameters
resolve_dynamic – whether to resolve dynamic inputs and outputs
- Returns
a definition
fiftyone.operators.types.Object
-
resolve_delegation
(ctx) → bool¶ Returns the resolved delegation flag.
Subclasses can implement this method to define the logic which decides if the operation should be queued for delegation
- Parameters
- Returns
a boolean
-
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_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
-
to_json
(ctx, resolve_dynamic=False)¶ Returns a JSON representation of the operator.
- Parameters
resolve_dynamic (False) – whether to resolve dynamic inputs and outputs
- Returns
a JSON dict
-
property
uri
¶ The unique identifier of the operator:
plugin_name/operator_name
.
-
property
-
class
fiftyone.operators.builtin.
ListFiles
(_builtin=False)¶ Bases:
fiftyone.operators.operator.Operator
Methods:
add_secrets
(secrets)Adds secrets to the operator.
execute
(ctx)Executes the operator.
resolve_definition
(resolve_dynamic, ctx)Returns a resolved definition of the operator.
resolve_delegation
(ctx)Returns the resolved delegation flag.
resolve_input
(ctx)Returns the resolved input property.
resolve_output
(ctx)Returns the resolved output property.
resolve_placement
(ctx)Returns the resolved placement of the operator.
resolve_type
(ctx, type)Returns the resolved input or output property.
to_json
(ctx[, resolve_dynamic])Returns a JSON representation of the operator.
Attributes:
Whether the operator is builtin.
The
OperatorConfig
for the operator.The unique identifier of the operator:
plugin_name/operator_name
.-
property
config
¶ The
OperatorConfig
for the operator.
-
execute
(ctx)¶ Executes the operator.
Subclasses must implement this method.
- Parameters
-
add_secrets
(secrets)¶ Adds secrets to the operator.
- Parameters
secrets – a list of secrets
-
property
builtin
¶ Whether the operator is builtin.
-
property
delegation_target
¶
-
property
name
¶
-
resolve_definition
(resolve_dynamic, ctx)¶ Returns a resolved definition of the operator.
The resolved definition is a clone of the default definition using
resolve_input()
andresolve_output()
to resolve the inputs and output properties of the operator.Passing
resolve_dynamic=False
allows resolution of dynamic operators to be deferred to execution time. If the operatoris_dyanmic
andresolve_dynamic
is False, a clone of default definition is returned.- Parameters
resolve_dynamic – whether to resolve dynamic inputs and outputs
- Returns
a definition
fiftyone.operators.types.Object
-
resolve_delegation
(ctx) → bool¶ Returns the resolved delegation flag.
Subclasses can implement this method to define the logic which decides if the operation should be queued for delegation
- Parameters
- Returns
a boolean
-
resolve_input
(ctx)¶ 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
-
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_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
-
to_json
(ctx, resolve_dynamic=False)¶ Returns a JSON representation of the operator.
- Parameters
resolve_dynamic (False) – whether to resolve dynamic inputs and outputs
- Returns
a JSON dict
-
property
uri
¶ The unique identifier of the operator:
plugin_name/operator_name
.
-
property
-
fiftyone.operators.builtin.
get_default_path_for_filesystem
(fs)¶
-
fiftyone.operators.builtin.
list_fileystems
()¶
-
fiftyone.operators.builtin.
list_files
(dirpath)¶