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.
This commit is contained in:
Daniel Han 2026-05-07 12:28:04 +00:00
commit 0566df2dc2

View file

@ -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