-
Notifications
You must be signed in to change notification settings - Fork 1
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
Parallel demo to test ProgressHandler queue strategy #51
Conversation
for more information, see https://pre-commit.ci
Thanks @garrettmflynn this strategy makes a lot more sense now and the code reads better (I'll still suggest various improvements for annotations, but I'm pretty sure I follow what's going on) - and is more realistic to our use in the GUIDE to boot Unfortunately, this is what it looks like on my end (Windows) video1034276567.mp4I had seen this behavior a while back with the multiple bar setup, where if there were too many updates going at once the web page would freeze, so I tried slowing the rate of the tasks (which is what you see in the video; all values just multiplied by Especially unfortunately I cannot exit this task with I'll give it a try and see if the Mac one works |
Yeah, the Mac one works fine for some reason Now that I see it running, one thing I'd suggest is the very first progress bar at the top - we want to be tracking the total progress over the length of the outer list of task times (so like, 1/7 after a single job completes a full list of tasks, then 2/7, etc. each will we also have the bars below showing the progress of each individual of the 7 tasks) Screen.Recording.2024-04-03.at.10.30.12.PM.mov |
I wonder, could you let a Flask endpoint run that progress handler (even more like on GUIDE) and see if that perhaps helps? (It's OK for now if the flask server has to be run on a separate terminal window if that helps - or have the demo launch command be another endpoint of the server able to be controlled by a button on the client) |
Alright I've switched the main parallel demo to Flask and added a Just FYI there were two implementations in this demo: one that was not queued, which was enabled by default, and one that is queued. I've swapped this now so that the queued version (rather than direct forwarding) is enabled by default. Can you confirm if the Windows issue is still seen on one or both demos? |
The flask one works great! The websocket one still has the same problems of not updating and being unable to cancel Can you add that 'total' top bar for the number of tasks completed? (always fixed in that top position) |
…o/tqdm_publisher into parallel-queue-test
for more information, see https://pre-commit.ci
Added! |
…o/tqdm_publisher into parallel-queue-test
for more information, see https://pre-commit.ci
I see the top bar present but it never updates |
Hmm it's working fine on Mac for both demos here. Since it relies on If this persists after switching to a global TQDM, I'll add an explicit call to pass these format options. |
I also keep seeing the following like in console while Flask is running
pings about every second or so - any idea what this is? It feels like it is the thing preventing keyboard interruption |
These are requests to reconnect the Websocket connection. Since we're using the same client for both WS and non-WS servers, the latter will result in 404 errors for these requests. I've limited the reconnection request to 3 tries so this doesn't go on forever. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #51 +/- ##
==========================================
- Coverage 54.54% 52.17% -2.38%
==========================================
Files 4 6 +2
Lines 66 92 +26
==========================================
+ Hits 36 48 +12
- Misses 30 44 +14
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Everything is working great on my end - happy to merge this as is and make improvements in follow ups |
Alright sounds good to me! |
This PR is a sandbox environment to test concerns raised in #49.
While implementing this, it became apparent that we can't use the
TQDMProgressHandler
directly when working with parallel progress bars because these exist on independent threads. To overcome this while still supporting the new class, all updates coming from the HTTP relay server are registered manually to the handler with the_announce
method.