Skip to content

fix: remove tqdm that may cause CI test to hang#861

Merged
yitchen-tim merged 2 commits intomainfrom
remove-tqdm
Apr 3, 2026
Merged

fix: remove tqdm that may cause CI test to hang#861
yitchen-tim merged 2 commits intomainfrom
remove-tqdm

Conversation

@yitchen-tim
Copy link
Copy Markdown
Contributor

Problem

02_Expectation_value_calculations_with_program_sets.ipynb is currently excluded from CI testing (EXCLUDED_NOTEBOOKS in test_all_notebooks.py) because it intermittently hangs during automated execution, sometimes completing in ~2 minutes and other times running until the 600-second testbook timeout kills it.

Hypothesis

We suspect that tqdm may have cause the issue. Some github issues report that tqdm can trigger deadlock and cause programs to hang.

Changes

All changes are in 02_Expectation_value_calculations_with_program_sets.ipynb:

  1. Removed from tqdm import tqdm import.
  2. Replaced tqdm(range(num_trials)) with a plain loop that uses print(..., end="\r") for lightweight progress reporting that doesn't flood IOPub.
  3. Added %%time cell magic to the two trial cells so execution time is still visible in notebook output.

@review-notebook-app
Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@yitchen-tim yitchen-tim marked this pull request as ready for review April 2, 2026 20:50
@yitchen-tim yitchen-tim requested a review from a team as a code owner April 2, 2026 20:50
@yitchen-tim yitchen-tim merged commit d51a8a9 into main Apr 3, 2026
12 checks passed
@yitchen-tim yitchen-tim deleted the remove-tqdm branch April 3, 2026 18:50
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.

2 participants