bqth29 / simulated-bifurcation-algorithm

Python CPU/GPU implementation of the Simulated Bifurcation (SB) algorithm to solve quadratic optimization problems (QUBO, Ising, TSP, optimal asset allocations for a portfolio, etc.).
MIT License
112 stars 26 forks source link

Use `tqdm.auto.tqdm` for optimal progressbars display #83

Open bqth29 opened 1 month ago

bqth29 commented 1 month ago

💬 Pull Request Description

Though the progressbars display was optimized for terminals, they appeared oddly in Jupyter notebooks with the same progressbar being displayed again and again each time it was updated.

Using from tqdm.auto import tqdm instead of from tqdm import tqdm fixed this and the display in notebooks is better visually.

✔️ Check list

🚀 New features

None.

🐞 Bug fixes

Bad progressbars display in Jupyter notebooks.

📣 Supplementary information

None.

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (a9ab8bb) to head (a52f85a).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #83 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 36 36 Lines 1600 1600 ========================================= Hits 1600 1600 ``` | [Flag](https://app.codecov.io/gh/bqth29/simulated-bifurcation-algorithm/pull/83/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Thomas+Bouquet) | Coverage Δ | | |---|---|---| | [](https://app.codecov.io/gh/bqth29/simulated-bifurcation-algorithm/pull/83/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Thomas+Bouquet) | `?` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Thomas+Bouquet#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.