Skip to content

Add option to show single progress bar for all workers#203

Open
ApolloBian wants to merge 3 commits intonalepae:masterfrom
ApolloBian:single_progress_bar
Open

Add option to show single progress bar for all workers#203
ApolloBian wants to merge 3 commits intonalepae:masterfrom
ApolloBian:single_progress_bar

Conversation

@ApolloBian
Copy link

As of now, each worker has its own progress bar, but it would be nice to have a summary bar for all workers, since sometimes it will be too cluttered to show all progress bars when the number of workers are too high, as mentioned in #134

I implemented this feature to allow users to pass an argument to pandarallel.initialize to select to use only one progress bar. The test results are shown below:
image

@codecov
Copy link

codecov bot commented Sep 8, 2022

Codecov Report

❌ Patch coverage is 52.94118% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.30%. Comparing base (a402a03) to head (1a8ff07).
⚠️ Report is 22 commits behind head on master.

Files with missing lines Patch % Lines
pandarallel/progress_bars.py 38.46% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #203      +/-   ##
==========================================
- Coverage   91.47%   90.30%   -1.18%     
==========================================
  Files          12       12              
  Lines         575      588      +13     
==========================================
+ Hits          526      531       +5     
- Misses         49       57       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@till-m
Copy link
Collaborator

till-m commented Sep 8, 2022

Hi @ApolloBian,

thanks for your contribution!
I personally like this feature and I see it has been requested by other users, but I don't know what @nalepae's stance is.

Something that I would like to see before merging is tests. As far as I'm concerned, this can just be turning the feature off and on, as we do with progress bars in general.

@nalepae as a sidenote, I think it would be good to enable workflows to run automatically/without approval from maintainers. I don't see any possibilities of the current workflow being used maliciously, but it would speed up development.

nb_requested_workers: int,
data_type: Type[DataType],
progress_bars_type: ProgressBarsType,
single_bar
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it would be good to have type hints for function arguments.

@till-m till-m linked an issue Sep 8, 2022 that may be closed by this pull request
@nalepae
Copy link
Owner

nalepae commented Jan 15, 2023

@till-m
image

It's the most permissive I can do :)

@lpuglia
Copy link

lpuglia commented May 22, 2023

any chance this is gonna be merged soon?

@till-m
Copy link
Collaborator

till-m commented May 23, 2023

Hey @lpuglia, after the requested changes are implemented this would principally be ready for merge.

@victormaricato
Copy link

Hey @till-m @ApolloBian @nalepae @lpuglia, is there anything missing for this to be merged? I can help if that's the case.

@till-m
Copy link
Collaborator

till-m commented Aug 21, 2023

Hey @victormaricato, there's a few PR's attempting to tackle this problem but none of them are currently ready to merge: (this), #239 and #243.

@nalepae
Copy link
Owner

nalepae commented Jan 23, 2024

Pandaral·lel is looking for a maintainer!
If you are interested, please open an GitHub issue.

@akuma527
Copy link

Hi,
Thanks for the implementation. I am currently testing the single progress bar feature and it works just fine. :)

Those wanting to install this feature: pip install git+https://github.com/nalepae/pandarallel.git@refs/pull/203/head

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

Successfully merging this pull request may close these issues.

How to have a single summary progress bar rather than one per process?

6 participants