-
-
Notifications
You must be signed in to change notification settings - Fork 150
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
feat(openadapt): add progress bar in record.py
and visualize.py
#318
Conversation
Quick Preview of Progress bar in Visualization: #316 (comment) |
Quick Preview of Progress Bar in Record: #316 (comment) |
Progress bar with Visualization looks good, but for record I have added the Progress bar in the function |
on record.py and visualize.py
The messy visualization are due to threads. as the function write_event is called in threads and multiple times as and when the action enveet are added to the write_performace queue. Hence, you will notice the progress bar in multiple times during the logging of record.py. |
we might need to use an event queue to ensure that there's only one progress bar. Or another approach could be to capture stdout while scrubbing (there isn't any useful info anyway it's usually just warnings about the process getting forked) |
@0dm This sounds good, But on thinking: For only 1 Progress bar we need a single Loop that iterate over Could you expand on how can we implement this :? |
as said in meeting - we should only use the progress bar after sending termination signal - it'll be cleaner |
Agreed! Working on it |
I am finding it difficult to replicate our requirement with alive-progress bar. The reason is that when want the progress bar disabled before the termination. As soon as record is terminated we want it to be activated and then start. We can disable the progress bar in alive-progress. But currently it does not have the feature to get reactivated/enabled. Hence, I am now tryin tqdm. I had to spent a lot of time today searching/fixing our use case. I was not able to work on extension due to this :( |
To be consistent with all of the files: I am using TQDM Progress bar with all Record.py, Visualization.py and Scripts/scrub.py/scrub_mp4 |
--add dynamic_cols: to enable adjustments when window is resized Order: --total -description --unit --Optional[bar_format] --colour --dynamic_ncols
visualization is working as expected now, I will try looking into the recording issue since it's still persisting. |
Thank you @0dm. Any alternatives you found for Mac in that case ? That serves the same purpose. |
@KrishPatel13 maybe this will be of use? https://gist.github.com/FanchenBao/d8577599c46eab1238a81857bb7277c9 |
@0dm |
works! |
just a few minor changes and I think we'll be good for merging |
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.
Self-reviewd!
@0dm Thank your time and help ;) |
record.py
and visualize.py
record.py
and visualize.py
record.py
and visualize.py
* run `poetry lock --no-update` * add alive-progress via poetry and in code * add progress bar in visualization * add a check for MAX_EVENT = None * update the title for the Progress bAr (better for USer pov) * update the requirement.txt * ran ` black --line-length 80 <file>` on record.py and visualize.py * remove all progress bar from record * add tqdm progress bar in recrod.py * add tqdm for visualiztion * remove alive-progress * consistent tqdm api --add dynamic_cols: to enable adjustments when window is resized Order: --total -description --unit --Optional[bar_format] --colour --dynamic_ncols * Update requirements.txt Co-authored-by: Aaron <[email protected]> * Address comemnt: OpenAdaptAI#318 (comment) * remove incorrect indent * remove rows * try to fix distorted table in html * add custom queue class * lint --line-length 80 * fix `NotImplementedError` for MacOs -- using custom MyQueue class * rename custom -> thirdparty_customization * rename to something useful * address comments * rename dir to customized_imports * rename to extensions OpenAdaptAI#318 (comment) --------- Co-authored-by: Aaron <[email protected]>
What kind of change does this PR introduce?
Feature: Add Progress Bar for Record and Visualization
Summary
Issue: #316
Checklist
How can your code be run and tested?
Other information