From 0566df2dc2003ccc9f4fdb98f1461b422f015c6e Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Thu, 7 May 2026 12:28:04 +0000 Subject: [PATCH] CI(notebooks): add triton to api-introspect install (unsloth import need) The api-introspect job's `Dump unsloth + trl API surface` step crashed on `import unsloth` because unsloth/_gpu_init.py:232 does an unconditional `import triton` and the install step did not pull triton in. The triton PyPI wheel installs cleanly on Linux x86_64 even without CUDA (the import succeeds; runtime GPU work is what would fail, which this job never does). Same rationale and same install pattern as consolidated-tests-ci.yml line 192-205. --- .github/workflows/notebooks-ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/notebooks-ci.yml b/.github/workflows/notebooks-ci.yml index 3ac6fe185d..36cc286cb7 100644 --- a/.github/workflows/notebooks-ci.yml +++ b/.github/workflows/notebooks-ci.yml @@ -197,9 +197,13 @@ jobs: # Pin to the same versions update_all_notebooks.py installs in # generated notebooks. Keep these in lockstep with PIN_TRL / # PIN_TRANSFORMERS in unslothai/notebooks/update_all_notebooks.py. + # `triton` is added because unsloth/_gpu_init.py:232 does an + # unconditional `import triton`; the PyPI wheel installs cleanly + # on Linux x86_64 even without CUDA (same rationale as + # consolidated-tests-ci.yml line 192-198). pip install 'transformers>=4.56,<5.6' 'trl>=0.22,<0.26' 'accelerate>=1.0' \ 'datasets>=3.4,<5' 'peft>=0.15,<0.20' \ - 'bitsandbytes>=0.43' 'sentencepiece' 'protobuf' + 'bitsandbytes>=0.43' 'sentencepiece' 'protobuf' triton # Converter deps (nbformat for notebook_to_python.py). pip install 'nbformat>=5.10' 'nbconvert>=7.16' pip install --no-deps unsloth_zoo unsloth