Skip to content

Drop verbose torchcodec rationale comment from install cells - #260

Merged
danielhanchen merged 1 commit into
mainfrom
chore/drop-torchcodec-comments
Apr 29, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
chore/drop-torchcodec-comments

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Summary

  • The two-line torchcodec rationale comment introduced in Pin torchcodec to match downgraded torch in qwen3_5 / nemotron_nano templates #259 lives inside the template strings, so update_all_notebooks.py renders it into every generated install cell. That clutters the user-facing notebook for no benefit since the pin itself is self-documenting.
  • Drop those comment lines from installation_qwen3_5_content and installation_nemotron_nano_content, then regenerate the qwen3_5 / nemotron_nano / granite4 notebooks and their python_scripts mirrors via update_all_notebooks.py.

Diff shape

29 files: update_all_notebooks.py (-4 comment lines), 14 nb/*.ipynb, 14 python_scripts/*.py. No semantic change to any install behavior.

…o install cells

The two-line ABI-mismatch explanation that #259 added inside the install
templates ends up rendered into every regenerated install cell. The pin
itself is self-documenting, so drop the comment and let update_all_notebooks.py
regenerate cleaner cells across the qwen3_5, nemotron_nano and granite4
families plus their python_scripts mirrors.
@danielhanchen
danielhanchen merged commit afd04f7 into main Apr 29, 2026
2 checks passed

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request removes explanatory comments regarding the pinning of torchcodec versions (0.6.0 and 0.7.0) across numerous Jupyter notebooks, exported Python scripts, and the update_all_notebooks.py utility. The modifications consistently eliminate the text describing ABI mismatches and specific version requirements for torchcodec when downgrading torch. I have no feedback to provide.

danielhanchen added a commit that referenced this pull request Apr 29, 2026
#261)

Two leftover bugs after #259 / #260:

1. installation_nemotron_nano_content pins torch==2.7.1 but #259 set
   torchcodec==0.6.0. Per pytorch/torchcodec's compatibility table 0.6
   targets torch 2.8, not 2.7; the right pin for torch 2.7 is
   torchcodec==0.5 (also covered by 0.4 / 0.3). The 0.6 wheel still
   ABI-mismatches against torch 2.7.1 the same way 0.10 did, so the
   nemotron and granite4 notebooks would still hit the libtorchcodec
   undefined-symbol error on Colab. Switch to torchcodec==0.5 (cp312
   manylinux wheel exists).

2. installation_qwen3_5_content, installation_nemotron_nano_content and
   installation_gpt_oss_content all install bare "tokenizers" (no
   constraint), but the transformers versions they pair with declare a
   hard tokenizers<=0.23.0,>=0.22.0:
       transformers 4.56.2: tokenizers<=0.23.0,>=0.22.0
       transformers 5.2.0:  tokenizers<=0.23.0,>=0.22.0
   PyPI's current latest tokenizers is 0.23.1, which is outside that
   range. Bare "tokenizers" pulls 0.23.1 into a transformers install
   that was never tested against it. The live notebooks already carry
   the constraint string "tokenizers>=0.22.0,<=0.23.0"; the templates
   were the drifted side. Sync templates to match.

Generated artifacts updated via update_all_notebooks.py.
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