Skip to content

fix: replace tqdm.notebook import with tqdm in helper scripts#3383

Open
abhayjeet5465 wants to merge 1 commit intoopenvinotoolkit:latestfrom
abhayjeet5465:fix/replace-tqdm-notebook-with-tqdm-in-helper-scripts
Open

fix: replace tqdm.notebook import with tqdm in helper scripts#3383
abhayjeet5465 wants to merge 1 commit intoopenvinotoolkit:latestfrom
abhayjeet5465:fix/replace-tqdm-notebook-with-tqdm-in-helper-scripts

Conversation

@abhayjeet5465
Copy link
Copy Markdown

Summary

Replaces from tqdm.notebook import tqdm with from tqdm import tqdm
in 4 helper scripts.

Problem

tqdm.notebook is designed exclusively for Jupyter notebook cells — it
renders an IPython widget. When the same import is used inside a plain
.py helper script (which gets imported by notebooks, not run as a cell),
it either falls back silently or raises a rendering warning depending on
the environment. The correct import for helper scripts is the standard
from tqdm import tqdm, which works correctly in both notebook and
non-notebook contexts.

Files Changed

  • notebooks/catvton/catvton_quantization_helper.py
  • notebooks/ltx-video/ltx_video_quantization_helper.py
  • notebooks/sam2-image-segmentation/automatic_mask_generation_helper.py
  • notebooks/stable-diffusion-v3-torch-fx/sd3_quantization_helper.py

Verification

Get-ChildItem -Path notebooks/ -Recurse -Include "*.py" |
  Select-String -Pattern "from tqdm\.notebook import tqdm"

Output: empty (all fixed)

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.

1 participant