Skip to content

Limit number of progress bars on larger multi-core systems #242

@applio

Description

@applio

Currently, pandarallel dutifully creates one progress bar for each and every worker but on multi-core systems with a large-ish number of cores (say 128 or more) seeing so many progress bars can be overwhelming. In these situations, it may prove more valuable to display a smaller number of progress bars (not necessarily one overall) with each worker mapped to one of the displayed progress bars.

What is proposed:

  1. For N workers, offer the option to display M progress bars where N >= M and each worker contributes to one progress bar (i.e. worker n contributes to progress bar m such that m = (n % M)).
  2. If an error occurs during execution, that worker's progress bar (which may represent progress from multiple workers) will indicate an error occurred, matching current functionality.
  3. Keep the existing default behavior unchanged so that not specifying a maximum number of progress bars to display results in as many progress bars as workers.

Additional motivation:
We have successfully used pandarallel on systems with a much larger number of cores than 128 where seeing as many progress bars as workers is genuinely problematic. We very much benefit from and do not want to simply disable the progress bars -- we want to monitor the progress of our parallel_apply() and parallel_map() operations in a digestible way and without flooding the screen / notebook with too much information.

Proposed implementation:
A working implementation has been prepared along with unittests -- a pull request will be added to this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions