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

[FR] Report labels along with progress of delegated operations? #104

Open
brimoor opened this issue Jan 16, 2024 · 0 comments
Open

[FR] Report labels along with progress of delegated operations? #104

brimoor opened this issue Jan 16, 2024 · 0 comments

Comments

@brimoor
Copy link
Contributor

brimoor commented Jan 16, 2024

Possible TODO

  • Add ProgressBar.start_msg property in voxel51-eta
  • Update all usages of ProgressBar in fiftyone to use start_msg rather than separate logging messages
  • Update the progress callbacks introduced in [WIP] Report progress of delegated operations #101 PR to use ctx.set_progress(label=pb.start_msg, progress=pb.progress)

Why? This would provide a bit more info to users about what is actually happening in our builtin operations. This may be especially useful if there is a builtin operation that uses multiple progress bars, in which case the naive implementation may involve two separate progress bars that "reset" progress back to 0% when the second progress bar starts.

One operation that could "want" to have multiple progress bars is @voxel51/io/import_samples when uploading media to a new location before adding samples:

fos.copy_files(inpaths, outpaths)

Currently if the upload step happens, there is no progress bar, so the progress indicator in #101 is not particularly useful in this case as it will sit at 0% for awhile and then rapidly jump to 100% as add_samples() is a faster operation than copy_files().

An alternative to the double progress bar problem is this pattern:

progress1 = lambda pb: ctx.set_progress(progress=0.5 * pb.progress)
progress2 = lambda pb: ctx.set_progress(progress=0.5 + 0.5 * pb.progress)
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

No branches or pull requests

1 participant