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

fix: disable_progressbar in compute_availabilitymatrix #356

Merged
merged 2 commits into from
Jul 11, 2024
Merged

Conversation

Irieo
Copy link
Contributor

@Irieo Irieo commented Jul 10, 2024

Changes proposed in this Pull Request

The function compute_availabilitymatrix() includes an option to disable the progress bar (disable_progressbar). However, for non-parallel computation path (i.e., when nprocesses is None, the code uses tqdm directly, w/o passing the disable_progressbar check. This PR fixes it. User is informed if progress bar is disabled.

Why bother: it seems that progress bar makes computation much slower. For a test case (UA, solar availability matrix, local computation, nprocesses is None) disabling progress bar speeds the process from 2000 seconds to 760 seconds.
Similar behavior was observed for other atlite processes, such as build_renewable_profiles (rumor evidence).

Closes #pypsa-eur/1090

Checklist

  • Code changes are sufficiently documented; i.e. new functions contain docstrings and further explanations may be given in doc.
  • A note for the release notes doc/release_notes.rst of the upcoming release is included.
  • I consent to the release of this PR's code under the MIT license.

@Irieo Irieo requested a review from FabianHofmann July 10, 2024 17:11
atlite/gis.py Outdated Show resolved Hide resolved
Co-authored-by: Fabian Hofmann <[email protected]>
@fneum fneum marked this pull request as ready for review July 11, 2024 07:43
@fneum fneum enabled auto-merge (rebase) July 11, 2024 07:43
@fneum fneum merged commit 1b3a3c0 into master Jul 11, 2024
2 of 5 checks passed
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.

3 participants