-
Notifications
You must be signed in to change notification settings - Fork 552
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding builtin operators for more of the FO interface #4830
Conversation
WalkthroughThe changes introduced in this pull request involve updates to methods in the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Recent review detailsConfiguration used: .coderabbit.yaml Files selected for processing (1)
Files skipped from review as they are similar to previous changes (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
Outside diff range and nitpick comments (3)
fiftyone/core/dataset.py (2)
Line range hint
4-4
: Reminder: Address the TODO comment.The TODO comment indicates that tests are missing for this function. Please ensure that the additional parameter change is thoroughly tested to confirm that it behaves as expected.
Do you want me to generate the unit testing code or open a GitHub issue to track this task?
Line range hint
12-24
: Consider adjusting the fee structure or discount policy.The implementation of a flat $20 fee on discounted bills could negate the benefit of the discount, especially for smaller purchases or marginal loyalty tiers. This might lead to customer dissatisfaction, as the intent to reward loyalty paradoxically increases the bill.
Consider revising either the discount percentages or the flat fee application to better align with customer incentives.
fiftyone/operators/builtin.py (1)
593-593
: Fix typographical error in error messageThere's a typo in the error message at line 593:
"Frrame field..."
should be"Frame field..."
.Apply this diff to correct the typo:
view=types.Error( label="Frame field already exists", - description=f"Frrame field '{new_field_name}' already exists", + description=f"Frame field '{new_field_name}' already exists", ),
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (2)
- fiftyone/core/dataset.py (3 hunks)
- fiftyone/operators/builtin.py (9 hunks)
Additional context used
Ruff
fiftyone/operators/builtin.py
115-115: Do not use bare
except
(E722)
1915-1915: Do not use bare
except
(E722)
2173-2173: Use
key in dict
instead ofkey in dict.keys()
Remove
.keys()
(SIM118)
2191-2191: Use
key in dict
instead ofkey in dict.keys()
Remove
.keys()
(SIM118)
), | ||
) | ||
|
||
# @todo infer this automatically from current App spaces |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, not at the moment. It should be fairly trivial to add it in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this could also include the opened panel names and ids that would be super useful
# @todo default to current workspace name, if one is currently open | ||
inputs.enum( | ||
"name", | ||
workspace_selector.values(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the current workspace is not available to operator context. This should also be fairly trivial to add.
This is awesome! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
Outside diff range and nitpick comments (2)
tests/unittests/dataset_tests.py (1)
5637-5648
: LGTM! Consider adding a comment for clarity.The new assertions effectively test the
_get_last_modified_at()
method for both samples and frames. This is a good addition to ensure the method accurately reflects the last modified time of the dataset.Consider adding a brief comment explaining the purpose of these new assertions for better code readability. For example:
# Verify that _get_last_modified_at() returns correct timestamps last_modified_at6b = dataset._get_last_modified_at() last_modified_at6c = dataset._get_last_modified_at(frames=True) self.assertEqual(last_modified_at6b, last_modified_at5b) self.assertEqual(last_modified_at6c, last_modified_at5c) # Verify that _get_last_modified_at() works correctly for dataset views last_modified_at7b = dataset.view()._get_last_modified_at() last_modified_at7c = dataset.view()._get_last_modified_at(frames=True) self.assertEqual(last_modified_at7b, last_modified_at5b) self.assertEqual(last_modified_at7c, last_modified_at5c)fiftyone/operators/builtin.py (1)
1921-1933
: Implement Automatic Retrieval of Current Workspace LayoutAt line 1921, there's a TODO comment indicating the intention to automatically infer the
spaces
parameter from the current App spaces. Implementing this feature would enhance user experience by eliminating the need for manual input of the workspace definition when saving a workspace.I can help implement this feature by retrieving the current
session.spaces
during operator execution. Would you like me to generate the necessary code or open a new GitHub issue to track this task?
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (3)
- fiftyone/core/collections.py (1 hunks)
- fiftyone/operators/builtin.py (7 hunks)
- tests/unittests/dataset_tests.py (1 hunks)
Additional context used
Ruff
fiftyone/core/collections.py
660-663: Use ternary operator
coll = dataset._frame_collection if frames else dataset._sample_collection
instead ofif
-else
-blockReplace
if
-else
-block withcoll = dataset._frame_collection if frames else dataset._sample_collection
(SIM108)
696-696: Do not use bare
except
(E722)
fiftyone/operators/builtin.py
115-115: Do not use bare
except
(E722)
1938-1938: Do not use bare
except
(E722)
2199-2199: Use
key in dict
instead ofkey in dict.keys()
Remove
.keys()
(SIM118)
2217-2217: Use
key in dict
instead ofkey in dict.keys()
Remove
.keys()
(SIM118)
Additional comments not posted (1)
fiftyone/core/collections.py (1)
646-652
: Code logic is clear and effectiveThe method
_sync_dataset_last_modified_at
correctly updates the dataset'slast_modified_at
property when necessary.
fiftyone/operators/builtin.py
Outdated
label="Error", | ||
view=types.Error( | ||
label="Frame field already exists", | ||
description=f"Frrame field '{new_field_name}' already exists", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typographical Error in Error Message
There's a typo in the error message at line 593. The word "Frrame" should be corrected to "Frame" to accurately reflect the field name.
Apply this diff to fix the typo:
- description=f"Frrame field '{new_field_name}' already exists",
+ description=f"Frame field '{new_field_name}' already exists",
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
description=f"Frrame field '{new_field_name}' already exists", | |
description=f"Frame field '{new_field_name}' already exists", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range and nitpick comments (1)
fiftyone/operators/builtin.py (1)
1921-1941
: Automate the inference of current App spacesThere is a TODO comment at line 1921 indicating the desire to automatically infer the current App spaces. Implementing this feature would enhance user experience by eliminating the need for users to manually input the workspace JSON when saving a workspace.
As a follow-up, I can help implement this functionality. Would you like me to open a new GitHub issue to track this enhancement?
Tools
Ruff
1938-1938: Do not use bare
except
(E722)
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (1)
- fiftyone/operators/builtin.py (7 hunks)
Additional context used
Ruff
fiftyone/operators/builtin.py
115-115: Do not use bare
except
(E722)
1938-1938: Do not use bare
except
(E722)
2245-2245: Use
key in dict
instead ofkey in dict.keys()
Remove
.keys()
(SIM118)
2263-2263: Use
key in dict
instead ofkey in dict.keys()
Remove
.keys()
(SIM118)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (1)
- fiftyone/operators/builtin.py (7 hunks)
Additional context used
Ruff
fiftyone/operators/builtin.py
115-115: Do not use bare
except
(E722)
1938-1938: Do not use bare
except
(E722)
2245-2245: Use
key in dict
instead ofkey in dict.keys()
Remove
.keys()
(SIM118)
2263-2263: Use
key in dict
instead ofkey in dict.keys()
Remove
.keys()
(SIM118)
Additional comments not posted (30)
fiftyone/operators/builtin.py (30)
9-13
: LGTM: New imports addedThe new imports for
json
andos
are appropriate for the added functionality in this file.
19-53
: LGTM: New EditFieldInfo operator addedThe
EditFieldInfo
operator is well-implemented with proper configuration, input resolution, and execution methods. It handles different field properties (description, info, read_only) appropriately.
181-197
: LGTM: CloneSampleField operator updatedThe changes to the
CloneSampleField
operator'sresolve_input
andexecute
methods are appropriate. They add support for targeting specific views or samples, enhancing the operator's flexibility.
199-288
: LGTM: _clone_sample_field_inputs function addedThe new
_clone_sample_field_inputs
function is well-implemented. It properly handles input generation for the CloneSampleField operator, including target selection, field selection, and validation of the new field name.
289-314
: LGTM: New CloneFrameField operator addedThe
CloneFrameField
operator is well-implemented with proper configuration, input resolution, and execution methods. It extends the functionality to clone frame fields, which is a useful addition to the system.
318-414
: LGTM: _clone_frame_field_inputs function addedThe new
_clone_frame_field_inputs
function is well-implemented. It properly handles input generation for the CloneFrameField operator, including checks for datasets with frame fields, target selection, field selection, and validation of the new field name.
429-441
: LGTM: RenameSampleField operator updatedThe changes to the
RenameSampleField
operator'sresolve_input
andexecute
methods are appropriate. They update the operator to use the new input generation function and correctly execute the renaming operation.
443-501
: LGTM: _rename_sample_field_inputs function addedThe new
_rename_sample_field_inputs
function is well-implemented. It properly handles input generation for the RenameSampleField operator, including checks for non-default fields, read-only fields, and validation of the new field name to prevent conflicts with existing fields.
503-526
: LGTM: New RenameFrameField operator addedThe
RenameFrameField
operator is well-implemented with proper configuration, input resolution, and execution methods. It extends the functionality to rename frame fields, which is a useful addition to the system.
529-596
: LGTM: _rename_frame_field_inputs function addedThe new
_rename_frame_field_inputs
function is well-implemented. It properly handles input generation for the RenameFrameField operator, including checks for datasets with frame fields, non-default fields, read-only fields, and validation of the new field name to prevent conflicts with existing fields.
609-621
: LGTM: ClearSampleField operator updatedThe changes to the
ClearSampleField
operator'sresolve_input
andexecute
methods are appropriate. They update the operator to use the new input generation function and correctly execute the clearing operation for sample fields.
623-687
: LGTM: _clear_sample_field_inputs function addedThe new
_clear_sample_field_inputs
function is well-implemented. It properly handles input generation for the ClearSampleField operator, including target selection (dataset, current view, selected samples), field selection, and checks for read-only fields.
689-711
: LGTM: New ClearFrameField operator addedThe
ClearFrameField
operator is well-implemented with proper configuration, input resolution, and execution methods. It extends the functionality to clear frame fields, which is a useful addition to the system.
714-787
: LGTM: _clear_frame_field_inputs function addedThe new
_clear_frame_field_inputs
function is well-implemented. It properly handles input generation for the ClearFrameField operator, including checks for datasets with frame fields, target selection (dataset, current view, selected samples), field selection, and checks for read-only fields.
883-893
: LGTM: DeleteSampleField operator updatedThe changes to the
DeleteSampleField
operator'sresolve_input
andexecute
methods are appropriate. They update the operator to use the new input generation function and correctly execute the deletion operation for sample fields.
896-929
: LGTM: _delete_sample_field_inputs function addedThe new
_delete_sample_field_inputs
function is well-implemented. It properly handles input generation for the DeleteSampleField operator, including checks for non-default fields and read-only fields. The function provides appropriate warnings and error messages when necessary.
931-953
: LGTM: New DeleteFrameField operator addedThe
DeleteFrameField
operator is well-implemented with proper configuration, input resolution, and execution methods. It extends the functionality to delete frame fields, which is a useful addition to the system.
956-998
: LGTM: _delete_frame_field_inputs function addedThe new
_delete_frame_field_inputs
function is well-implemented. It properly handles input generation for the DeleteFrameField operator, including checks for datasets with frame fields, non-default fields, and read-only fields. The function provides appropriate warnings and error messages when necessary.
1000-1053
: LGTM: New CreateIndex operator addedThe
CreateIndex
operator is well-implemented with proper configuration, input resolution, and execution methods. It provides functionality to create indexes on fields, which can be useful for improving query performance in the dataset.
1055-1104
: LGTM: New DropIndex operator addedThe
DropIndex
operator is well-implemented with proper configuration, input resolution, and execution methods. It provides functionality to drop indexes from fields, which complements the CreateIndex operator and allows for index management in the dataset.
1106-1147
: LGTM: New CreateSummaryField operator addedThe
CreateSummaryField
operator is well-implemented with proper configuration, input resolution, and execution methods. It provides functionality to create summary fields in the dataset, which can be useful for data analysis and visualization.
1149-1275
: LGTM: _create_summary_field_inputs function addedThe new
_create_summary_field_inputs
function is well-implemented. It properly handles input generation for the CreateSummaryField operator, including field selection, naming, sidebar grouping, and various options specific to different field types (categorical or numeric). The function provides appropriate input controls and validation for creating summary fields.
1277-1300
: LGTM: New UpdateSummaryField operator addedThe
UpdateSummaryField
operator is well-implemented with proper configuration, input resolution, and execution methods. It provides functionality to update existing summary fields in the dataset, which is important for maintaining up-to-date summary information.
1302-1340
: LGTM: _update_summary_field_inputs function addedThe new
_update_summary_field_inputs
function is well-implemented. It properly handles input generation for the UpdateSummaryField operator, including checks for existing summary fields and whether they need updating. The function provides appropriate warnings when no summary fields exist or when a selected field is already up-to-date.
1341-1384
: LGTM: New DeleteSummaryField operator addedThe
DeleteSummaryField
operator is well-implemented with proper configuration, input resolution, and execution methods. It provides functionality to delete summary fields from the dataset, which completes the set of operations for managing summary fields (create, update, delete).
1387-1445
: LGTM: New AddGroupSlice operator addedThe
AddGroupSlice
operator is well-implemented with proper configuration, input resolution, and execution methods. It provides functionality to add group slices to the dataset, which is useful for managing and organizing data in datasets containing groups.
1447-1507
: LGTM: New RenameGroupSlice operator addedThe
RenameGroupSlice
operator is well-implemented with proper configuration, input resolution, and execution methods. It provides functionality to rename existing group slices in the dataset, which is useful for maintaining organized and meaningful group structures.
1509-1553
: LGTM: New DeleteGroupSlice operator addedThe
DeleteGroupSlice
operator is well-implemented with proper configuration, input resolution, and execution methods. It provides functionality to delete group slices from the dataset, which completes the set of operations for managing group slices (add, rename, delete).
2277-2308
: LGTM: BUILTIN_OPERATORS list updatedThe
BUILTIN_OPERATORS
list has been appropriately updated to include all the new operators added in this file. This ensures that the new functionality is properly registered and available for use within the framework.
Line range hint
1-2308
: Overall assessment: Well-implemented enhancements to the builtin operatorsThis update to the
fiftyone/operators/builtin.py
file introduces a significant number of new operators and utility functions that greatly enhance the capabilities of the FiftyOne framework. The additions include:
- Field management operators (Edit, Clone, Rename, Clear, Delete) for both sample and frame fields.
- Index management operators (Create, Drop).
- Summary field operators (Create, Update, Delete).
- Group slice operators (Add, Rename, Delete).
- Workspace management operators.
All new additions are well-structured, following consistent patterns in their implementation. They provide a comprehensive set of tools for dataset manipulation, improving the overall functionality and flexibility of the system.
One minor issue with a bare except clause was identified and addressed.
These changes will significantly improve the user's ability to manage and manipulate datasets within the FiftyOne framework.
2191c86
to
229d780
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (5)
- docs/source/brain.rst (1 hunks)
- fiftyone/core/collections.py (1 hunks)
- fiftyone/core/dataset.py (4 hunks)
- fiftyone/operators/builtin.py (7 hunks)
- tests/unittests/dataset_tests.py (1 hunks)
Files skipped from review due to trivial changes (1)
- docs/source/brain.rst
Files skipped from review as they are similar to previous changes (2)
- fiftyone/core/dataset.py
- tests/unittests/dataset_tests.py
Additional context used
Ruff
fiftyone/core/collections.py
660-663: Use ternary operator
coll = dataset._frame_collection if frames else dataset._sample_collection
instead ofif
-else
-blockReplace
if
-else
-block withcoll = dataset._frame_collection if frames else dataset._sample_collection
(SIM108)
696-696: Do not use bare
except
(E722)
fiftyone/operators/builtin.py
115-115: Do not use bare
except
(E722)
1938-1938: Do not use bare
except
(E722)
2245-2245: Use
key in dict
instead ofkey in dict.keys()
Remove
.keys()
(SIM118)
2263-2263: Use
key in dict
instead ofkey in dict.keys()
Remove
.keys()
(SIM118)
Additional comments not posted (30)
fiftyone/operators/builtin.py (30)
19-53
: LGTM: Well-implementedEditFieldInfo
classThe
EditFieldInfo
class is well-structured and correctly implements the necessary methods for a FiftyOne operator. Theexecute
method properly handles field editing operations, including description, info, and read-only status updates.
289-315
: LGTM: Well-implementedCloneFrameField
classThe
CloneFrameField
class is correctly structured and implements the necessary methods for a FiftyOne operator. Theexecute
method properly handles frame field cloning operations.
318-414
: LGTM: Well-implemented_clone_frame_field_inputs
functionThe
_clone_frame_field_inputs
function is well-structured and handles various input scenarios comprehensively. It includes proper checks for the existence of frame fields and provides appropriate user feedback.
503-526
: LGTM: Well-implementedRenameFrameField
classThe
RenameFrameField
class is correctly structured and implements the necessary methods for a FiftyOne operator. Theexecute
method properly handles frame field renaming operations.
529-595
: LGTM: Well-implemented_rename_frame_field_inputs
functionThe
_rename_frame_field_inputs
function is well-structured and handles various input scenarios comprehensively. It includes proper checks for the existence of frame fields, read-only status, and provides appropriate user feedback.
689-711
: LGTM: Well-implementedClearFrameField
classThe
ClearFrameField
class is correctly structured and implements the necessary methods for a FiftyOne operator. Theexecute
method properly handles frame field clearing operations.
714-786
: LGTM: Well-implemented_clear_frame_field_inputs
functionThe
_clear_frame_field_inputs
function is well-structured and handles various input scenarios comprehensively. It includes proper checks for the existence of frame fields, read-only status, and provides appropriate user feedback for different targets (dataset, current view, or selected samples).
931-953
: LGTM: Well-implementedDeleteFrameField
classThe
DeleteFrameField
class is correctly structured and implements the necessary methods for a FiftyOne operator. Theexecute
method properly handles frame field deletion operations.
956-997
: LGTM: Well-implemented_delete_frame_field_inputs
functionThe
_delete_frame_field_inputs
function is well-structured and handles various input scenarios comprehensively. It includes proper checks for the existence of frame fields, non-default fields, read-only status, and provides appropriate user feedback.
1000-1053
: LGTM: Well-implementedCreateIndex
classThe
CreateIndex
class is correctly structured and implements the necessary methods for a FiftyOne operator. Theresolve_input
method provides a comprehensive input resolution, and theexecute
method properly handles index creation with optional uniqueness constraint.
1055-1103
: LGTM: Well-implementedDropIndex
classThe
DropIndex
class is correctly structured and implements the necessary methods for a FiftyOne operator. Theresolve_input
method provides a comprehensive input resolution, excluding default indexes, and theexecute
method properly handles index dropping.
1106-1147
: LGTM: Well-implementedCreateSummaryField
classThe
CreateSummaryField
class is correctly structured and implements the necessary methods for a FiftyOne operator. Theexecute
method properly handles summary field creation with various options such as sidebar group, include counts, group by, read-only status, and index creation.
1149-1274
: LGTM: Well-implemented_create_summary_field_inputs
functionThe
_create_summary_field_inputs
function is well-structured and provides comprehensive input resolution for creating summary fields. It handles different field types (categorical and numeric) appropriately and includes various options such as sidebar group, include counts, group by, read-only status, and index creation.
1277-1299
: LGTM: Well-implementedUpdateSummaryField
classThe
UpdateSummaryField
class is correctly structured and implements the necessary methods for a FiftyOne operator. Theexecute
method properly handles updating the specified summary field.
1302-1339
: LGTM: Well-implemented_update_summary_field_inputs
functionThe
_update_summary_field_inputs
function is well-structured and provides comprehensive input resolution for updating summary fields. It includes proper checks for the existence of summary fields and their update status, providing appropriate user feedback.
1341-1384
: LGTM: Well-implementedDeleteSummaryField
classThe
DeleteSummaryField
class is correctly structured and implements the necessary methods for a FiftyOne operator. Theresolve_input
method provides comprehensive input resolution, and theexecute
method properly handles summary field deletion.
1387-1445
: LGTM: Well-implementedAddGroupSlice
classThe
AddGroupSlice
class is correctly structured and implements the necessary methods for a FiftyOne operator. Theresolve_input
method provides comprehensive input resolution, including checks for group dataset type and existing slices. Theexecute
method properly handles group slice addition.
1447-1506
: LGTM: Well-implementedRenameGroupSlice
classThe
RenameGroupSlice
class is correctly structured and implements the necessary methods for a FiftyOne operator. Theresolve_input
method provides comprehensive input resolution, including checks for group dataset type and existing slices. Theexecute
method properly handles group slice renaming.
1509-1552
: LGTM: Well-implementedDeleteGroupSlice
classThe
DeleteGroupSlice
class is correctly structured and implements the necessary methods for a FiftyOne operator. Theresolve_input
method provides comprehensive input resolution, including checks for group dataset type and existing slices. Theexecute
method properly handles group slice deletion.
1555-1565
: LGTM: Well-implementedListSavedViews
classThe
ListSavedViews
class is correctly structured and implements the necessary methods for a FiftyOne operator. Theexecute
method properly handles listing saved views with their information.
1568-1610
: LGTM: Well-implementedLoadSavedView
classThe
LoadSavedView
class is correctly structured and implements the necessary methods for a FiftyOne operator. Theresolve_input
method provides comprehensive input resolution, including checks for existing saved views. Theexecute
method properly handles loading the specified saved view.
1612-1679
: LGTM: Well-implementedSaveView
classThe
SaveView
class is correctly structured and implements the necessary methods for a FiftyOne operator. Theresolve_input
method provides comprehensive input resolution, including options for name, description, and color. Theexecute
method properly handles saving the view with the specified parameters.
1681-1707
: LGTM: Well-implementedEditSavedViewInfo
classThe
EditSavedViewInfo
class is correctly structured and implements the necessary methods for a FiftyOne operator. Theresolve_input
method uses a helper function for input resolution, and theexecute
method properly handles updating the saved view information.
1709-1772
: LGTM: Well-implemented_edit_saved_view_info_inputs
functionThe
_edit_saved_view_info_inputs
function is well-structured and provides comprehensive input resolution for editing saved view information. It includes proper checks for existing saved views, handles name conflicts, and provides options for updating description and color.
1775-1818
: LGTM: Well-implementedDeleteSavedView
classThe
DeleteSavedView
class is correctly structured and implements the necessary methods for a FiftyOne operator. Theresolve_input
method provides comprehensive input resolution, including checks for existing saved views. Theexecute
method properly handles deleting the specified saved view.
Line range hint
1821-1833
: LGTM: Well-implementedListWorkspaces
classThe
ListWorkspaces
class is correctly structured and implements the necessary methods for a FiftyOne operator. Theexecute
method properly handles listing workspaces with their information.
1836-1876
: LGTM: Well-implementedLoadWorkspace
classThe
LoadWorkspace
class is correctly structured and implements the necessary methods for a FiftyOne operator. Theresolve_input
method provides comprehensive input resolution, including checks for existing workspaces. Theexecute
method properly handles loading the specified workspace.
1974-1999
: LGTM: Well-implementedEditWorkspaceInfo
classThe
EditWorkspaceInfo
class is correctly structured and implements the necessary methods for a FiftyOne operator. Theresolve_input
method uses a helper function for input resolution, and theexecute
method properly handles updating the workspace information.
2002-2065
: LGTM: Well-implemented_edit_workspace_info_inputs
functionThe
_edit_workspace_info_inputs
function is well-structured and provides comprehensive input resolution for editing workspace information. It includes proper checks for existing workspaces, handles name conflicts, and provides options for updating description and color.
2068-2111
: LGTM: Well-implementedDeleteWorkspace
classThe
DeleteWorkspace
class is correctly structured and implements the necessary methods for a FiftyOne operator. Theresolve_input
method provides comprehensive input resolution, including checks for existing workspaces. Theexecute
method properly handles deleting the specified workspace.
+1 this is awesome! 🚀 |
Issues from testing locally:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rest LGTM. Tested locally 🚀
Change log
Added the following new builtin operators:
edit_field_info
clone_frame_field
rename_frame_field
clear_frame_field
delete_frame_field
create_index
drop_index
create_summary_field
update_summary_field
delete_summary_field
add_group_slice
rename_group_slice
delete_group_slice
load_saved_view
save_view
edit_saved_view_info
delete_saved_view
edit_workspace_info
sync_last_modified_at
Enhancements to existing builtin operators
Other updates
created_at
orlast_modified_at
field)max(last_modified_at)
computations via a new_get_last_modified_at()
methodlast_modified_at
times are exactly in-sync when creating/updating saved viewsTested by
Manual tests with the
quickstart
,quickstart-video
, andquickstart-groups
datasets.