fiftyone.operators.operations¶
FiftyOne operator execution.
Classes:
|
Interface to trigger builtin operations on an execution context. |
-
class
fiftyone.operators.operations.
Operations
(ctx)¶ Bases:
object
Interface to trigger builtin operations on an execution context.
- Parameters
Methods:
Clone the selected samples in the App.
clone_sample_field
(field_name, new_field_name)Clone a sample field to a new field name.
rename_sample_field
(field_name, new_field_name)Rename a sample field to a new field name.
clear_sample_field
(field_name)Clear the contents of a sample field.
Delete the selected samples in the App.
Delete the selected labels in the App.
delete_sample_field
(field_name)Delete a sample field.
print_stdout
(message)Print a message to the standard output.
list_files
([path, list_filesystems])List files in a directory or list filesystems.
Reload the sample grid in the App.
Reload the dataset in the App.
Clear selected samples in the App.
Copy the current view in the App as JSON.
Set the view in the App from JSON present in clipboard.
open_panel
(name[, is_active, layout])Open a panel with the given name and layout options in the App.
Open all available panels in the App.
close_panel
(name)Close the panel with the given name in the App.
Close all open panels in the App.
split_panel
(name, layout)Split the panel with the given layout in the App.
open_dataset
(dataset_name)Open the specified dataset in the App.
Clear the view bar in the App.
Clear all filters in the App’s sidebar.
Clear all selections, filters, and view stages from the App.
Refresh the colors used in the App’s UI.
Show the samples that are currently selected in the App.
Convert the extended selection to selected samples in the App.
set_selected_samples
(samples)Select the specified samples in the App.
set_view
([view, name])Set the current view in the App.
show_samples
(samples[, use_extended_selection])Show specific samples, optionally using extended selection in the App.
console_log
(message)Log a message to the console.
show_output
(outputs, results)Show output in the App’s UI.
set_progress
([label, progress, variant])Set the progress indicator in the App’s UI.
test_operator
(operator, raw_params)Test the operator with given parameters.
set_selected_labels
(labels)Set the selected labels in the App.
Clear the selected labels in the App.
-
clone_selected_samples
()¶ Clone the selected samples in the App.
-
clone_sample_field
(field_name, new_field_name)¶ Clone a sample field to a new field name.
- Parameters
field_name – the name of the field to clone
new_field_name – the name for the new field
-
rename_sample_field
(field_name, new_field_name)¶ Rename a sample field to a new field name.
- Parameters
field_name – the name of the field to rename
new_field_name – the new name for the field
-
clear_sample_field
(field_name)¶ Clear the contents of a sample field.
- Parameters
field_name – the name of the field to clear
-
delete_selected_samples
()¶ Delete the selected samples in the App.
-
delete_selected_labels
()¶ Delete the selected labels in the App.
-
delete_sample_field
(field_name)¶ Delete a sample field.
- Parameters
field_name – the name of the field to delete
-
print_stdout
(message)¶ Print a message to the standard output.
- Parameters
message – the message to print
-
list_files
(path=None, list_filesystems=False)¶ List files in a directory or list filesystems.
- Parameters
path (None) – the path to list files from, or None to list filesystems
list_filesystems (False) – whether to list filesystems instead of files
-
reload_samples
()¶ Reload the sample grid in the App.
-
reload_dataset
()¶ Reload the dataset in the App.
-
clear_selected_samples
()¶ Clear selected samples in the App.
-
copy_view_as_json
()¶ Copy the current view in the App as JSON.
-
view_from_json
()¶ Set the view in the App from JSON present in clipboard.
-
open_panel
(name, is_active=True, layout=None)¶ Open a panel with the given name and layout options in the App.
- Parameters
name – the name of the panel to open
is_active (True) – whether to activate the panel immediately
layout (None) – the layout orientation
("horizontal", "vertical")
, if applicable
-
open_all_panels
()¶ Open all available panels in the App.
-
close_panel
(name)¶ Close the panel with the given name in the App.
- Parameters
name – the name of the panel to close
-
close_all_panels
()¶ Close all open panels in the App.
-
split_panel
(name, layout)¶ Split the panel with the given layout in the App.
- Parameters
name – the name of the panel to split
layout – the layout orientation
("horizontal", "vertical")
-
open_dataset
(dataset_name)¶ Open the specified dataset in the App.
- Parameters
dataset_name – the name of the dataset to open
-
clear_view
()¶ Clear the view bar in the App.
Clear all filters in the App’s sidebar.
-
clear_all_stages
()¶ Clear all selections, filters, and view stages from the App.
-
refresh_colors
()¶ Refresh the colors used in the App’s UI.
-
show_selected_samples
()¶ Show the samples that are currently selected in the App.
-
convert_extended_selection_to_selected_samples
()¶ Convert the extended selection to selected samples in the App.
-
set_selected_samples
(samples)¶ Select the specified samples in the App.
- Parameters
samples – a list of sample IDs to select
-
set_view
(view=None, name=None)¶ Set the current view in the App.
- Parameters
view (None) – a
fiftyone.core.view.DatasetView
to loadname (None) – the name of a saved view to load
-
show_samples
(samples, use_extended_selection=False)¶ Show specific samples, optionally using extended selection in the App.
- Parameters
samples – a list of sample IDs to show
use_extended_selection (False) – whether to use the extended selection feature
-
console_log
(message)¶ Log a message to the console.
- Parameters
message – the message to log
-
show_output
(outputs, results)¶ Show output in the App’s UI.
- Parameters
outputs – outputs to show
results – results to display
-
set_progress
(label=None, progress=None, variant=None)¶ Set the progress indicator in the App’s UI.
- Parameters
label (None) – a label for the progress indicator
progress (None) – a progress value to set
variant (None) – the type of indicator
("linear", "circular")
-
test_operator
(operator, raw_params)¶ Test the operator with given parameters.
- Parameters
operator – the operator to test
raw_params – raw parameters for the operator
-
set_selected_labels
(labels)¶ Set the selected labels in the App.
- Parameters
labels – the labels to select
-
clear_selected_labels
()¶ Clear the selected labels in the App.