Skip to content

Pin torchcodec for Gemma 4 audio notebook - #309

Draft
Auro-rium wants to merge 1 commit into
unslothai:mainfrom
Auro-rium:agent/fix-gemma4-audio-torchcodec
Draft

Auro-rium wants to merge 1 commit into
unslothai:mainfrom
Auro-rium:agent/fix-gemma4-audio-torchcodec

Conversation

@Auro-rium

Copy link
Copy Markdown

Closes #304

What

Pin torchcodec to 0.10.0 in the Gemma 4 E2B audio notebook and its generated Python script.

Why

Unsloth 2026.7.3 installs Torch 2.10.0+cu128. The notebook currently installs unpinned torchcodec, allowing pip to select a newer release that rejects the Torch 2.10 installation during import. Issue #304 reports that torchcodec==0.10.0 is the compatible release.

How

Replace the unversioned install with torchcodec==0.10.0 in both the source notebook and the generated script so Colab and script users resolve the same compatible dependency.

Validation

  • Notebook JSON validity test passed.
  • Generated Python-script parity test passed.
  • Python syntax compilation passed.
  • git diff --check passed.
  • Verified both artifacts contain exactly one torchcodec==0.10.0 install.

Note

This patch was prepared with assistance from Codex.

@danielhanchen

Copy link
Copy Markdown
Member

Confirmed the Gemma 4 audio install still ends up unpinned, but nb/ and python_scripts/ are regenerated from update_all_notebooks.py, where line 711 is still the plain pip install torchcodec. Could you move the pin there and re-run the generator, and rebase since the branch is conflicting?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

unsloth==2026.7.3 use torch==2.10.0 requires torchcodec==0.10.0

2 participants