Skip to content
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

Reload saved view #122

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Reload saved view #122

wants to merge 7 commits into from

Conversation

brimoor
Copy link
Contributor

@brimoor brimoor commented Mar 11, 2024

Adds a @voxel51/utils/reload_saved_view operator that allows the user to trigger a reload() of a generated view (patches, frames, clips).

On fiftyone>=1.0.0, the operator inspects the last_modified_at times of the view and dataset's samples to attempt to provide guidance on whether the view is up-to-date.

Note that, in the example below, the App is not able to conclusively discern that patches is outdated after sample deletion as deletion does not increase any last_modified_at value. This would require further core SDK enhancement in fiftyone>1.0.0.

Example usage

import fiftyone as fo
import fiftyone.zoo as foz

dataset = foz.load_zoo_dataset("quickstart")

limit = dataset.limit(100)
patches = dataset.to_patches("ground_truth")

dataset.save_view("limit", limit)
dataset.save_view("patches", patches)

session = fo.launch_app(patches)

dataset.delete_samples(dataset[:50])

# Use reload_saved_view to reload 'patches' view in the App

Usage

Screenshot 2024-09-24 at 9 53 31 AM Screenshot 2024-09-24 at 9 54 13 AM

@brimoor brimoor requested a review from a team March 11, 2024 13:55
@brimoor brimoor force-pushed the reload-saved-view branch 2 times, most recently from 87eb185 to 62edbf8 Compare April 13, 2024 14:56
@brimoor brimoor requested review from imanjra, ritch, swheaton and benjaminpkane and removed request for a team September 24, 2024 03:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants