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

Update progress bars #1031

Merged
merged 7 commits into from
Aug 9, 2023
Merged

Update progress bars #1031

merged 7 commits into from
Aug 9, 2023

Conversation

camisowers
Copy link
Contributor

@camisowers camisowers commented Jul 31, 2023

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

What is the purpose of this PR?

  1. Closes Update progress bar for helpful debugging #1028. Add current processing FOV name to progress bar output in the ark notebooks.
  2. Closes Progress bar in create_deepcell_output function behaviour  #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)
  • (This one is quirky) Sometimes deepcell.org/api/redis will return a lower completion rate than it had before. When combined with the above issue, the math doesn't math to 100. We just need to account for this by only updating the progress bar status when it has increased.
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)

@camisowers camisowers added the enhancement New feature or request label Jul 31, 2023
@camisowers camisowers self-assigned this Jul 31, 2023
@camisowers camisowers added the bug Something isn't working label Aug 1, 2023
Copy link
Contributor

@srivarra srivarra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, just a tqdm import suggestion and some units are missing in a few loops

src/ark/segmentation/fiber_segmentation.py Outdated Show resolved Hide resolved
src/ark/analysis/neighborhood_analysis.py Outdated Show resolved Hide resolved
src/ark/analysis/spatial_analysis_utils.py Outdated Show resolved Hide resolved
src/ark/analysis/spatial_enrichment.py Outdated Show resolved Hide resolved
src/ark/segmentation/fiber_segmentation.py Outdated Show resolved Hide resolved
src/ark/utils/data_utils.py Show resolved Hide resolved
src/ark/utils/data_utils.py Show resolved Hide resolved
Copy link
Contributor

@alex-l-kong alex-l-kong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing to add on top of Sri's comments.

Copy link
Contributor

@srivarra srivarra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@camisowers camisowers marked this pull request as ready for review August 1, 2023 22:49
@alex-l-kong alex-l-kong self-requested a review August 1, 2023 23:28
@HPiyadasa HPiyadasa added this pull request to the merge queue Aug 9, 2023
@HPiyadasa
Copy link

Looks great

Merged via the queue into main with commit 82b9312 Aug 9, 2023
16 checks passed
@HPiyadasa HPiyadasa deleted the progress_bar_update branch August 9, 2023 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update progress bar for helpful debugging Progress bar in create_deepcell_output function behaviour
4 participants