Skip to content

Notebooks smoke: run the install cell the way Colab does - #14058

Merged
danielhanchen merged 1 commit into
mainfrom
fix/notebook-smoke-colab-shape
Oct 17, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
fix/notebook-smoke-colab-shape

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Summary

Two install-cell smoke legs fail on main's scheduled Notebooks CI (2026-10-17 06:39, run 39010742438):

  • nb/Nemotron-3-Nano-30B-A3B_A100.ipynb
  • nb/Qwen3_5_(4B)_Vision.ipynb

Both fail like this:

error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
FileNotFoundError: [Errno 2] No such file or directory: 'unsloth'

Their install cells use !uv pip install, and the next line is !unsloth install-kernels (unslothai/notebooks #385). On Colab the uv lines work because Colab sets UV_SYSTEM_PYTHON=true. I checked this on a live release-colab-external-images_20261014 runtime, along with its COLAB_* keys. The smoke job installs into the runner's system interpreter as a stand-in for Colab's, but its install step set neither:

  • uv refused to run.
  • The notebooks also took their non-Colab branch, since they choose the branch on any environment key containing COLAB_.

Setting only UV_SYSTEM_PYTHON is not enough, which I tried first while working on #14056. The non-Colab branch then left transformers==4.57.6 (installed --no-deps) beside huggingface_hub 1.29, which it refuses to import with, and the gpt-oss leg lost triton. Colab's own branch reinstalls with dependencies, so the job has to take that branch to test what Colab users run.

Change

  • notebooks-ci.yml: the Run install cell step sets UV_SYSTEM_PYTHON: 'true' and a COLAB_SMOKE_SHAPED: '1' marker, with a comment explaining why.
    • The marker is scoped to that one step, which stops before from unsloth import.
    • Its name matches none of the specific COLAB_* keys Unsloth reads (COLAB_ENVIRONMENT, COLAB_IFRAME_HEIGHT, ...).
    • disk_utils' generic COLAB_ scan never runs inside that step.
  • tests/notebooks/test_smoke_install_contract.py: test_the_install_cell_runs_the_way_colab_does requires a COLAB_* key and UV_SYSTEM_PYTHON on every step that runs the converted install cell.

Testing

  • Notebooks CI with include_smoke=true on this branch (run 39017258647): all eight smoke legs pass, including Nemotron-3-Nano and Qwen3_5 Vision, which fail on main. GRPO and gpt-oss also still pass.
  • The Nemotron leg did real work rather than skipping:
    • It printed no No virtual environment found.
    • uv installed and uninstalled packages.
    • unsloth install-kernels ran and chose its torch fallback for causal_conv1d and mamba_ssm on CPU torch.
    • OK: imports pass under CUDA spoof.
  • Contract test: test_smoke_install_contract.py gives 39 passed. With the workflow change reverted, the new test fails.

The static + transitive resolve job is still red in that run. That is the Colab oracle snapshot drift that has failed on every scheduled run since at least 2026-09-27, and it is unrelated to this change.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-17T08:36:21.179643Z 5502cb1 Manual request
🔒 Security Review ⚠️ Failed 2026-10-17T08:34:43.309474Z 5502cb1 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 5502cb15b7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen
danielhanchen merged commit e795149 into main Oct 17, 2026
@danielhanchen
danielhanchen deleted the fix/notebook-smoke-colab-shape branch October 17, 2026 08:40
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