angelolab / ark-analysis

Integrated pipeline for multiplexed image analysis
https://ark-analysis.readthedocs.io/en/latest/
MIT License
73 stars 26 forks source link

Update progress bars #1031

Closed camisowers closed 1 year ago

camisowers commented 1 year ago

If you haven't already, please read through our contributing guidelines before opening your PR

What is the purpose of this PR?

  1. Closes #1028. Add current processing FOV name to progress bar output in the ark notebooks.
  2. Closes #970. Fix incorrect progress bars that show <100% even though the batch was processed fine.

How did you implement your changes

  1. Update the FOV name at start of each code block using progress_bar.set_postfix(FOV=fov).

  2. I was able to replicate @HPiyadasa's issue, and it turns out two things could potentially happen with the current code:

    • Since we only check the progress every 3 seconds, sometimes we don't always know that the last fov is in progress before getting a "done" response from the api and closing the progress bar. We simply need to ensure the progress bar gets updated for completion before breaking the batch loop and closing the progress bar.
Screenshot 2023-08-01 at 1 58 49 PM (2) Screenshot 2023-08-01 at 12 35 06 PM (2)

Remaining issues

Nothing, I've solved all issues forever.

Screenshot 2023-08-01 at 2 27 44 PM (2)
HPiyadasa commented 1 year ago

Looks great