From f3e541dd12d5eb488cda54308da2651fa2fa425a Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Thu, 7 May 2026 12:58:34 +0000 Subject: [PATCH] CI(notebooks): api-introspect installs unsloth from local checkout The api-introspect job was pulling PyPI's `unsloth` via `pip install --no-deps unsloth`. Latest released PyPI unsloth lacks the CPU-torch fallback in unsloth/kernels/utils.py (lines 162-170) that this branch carries, so `import unsloth` crashes with AttributeError on `torch._C._cuda_getCurrentRawStream` (CPU torch doesn't compile that symbol). Switch to `pip install --no-deps -e ./unsloth` so the api-introspect job validates the code in THIS PR head, not whatever's currently on PyPI. unsloth_zoo continues to come from PyPI since the PR doesn't modify unsloth_zoo. --- .github/workflows/notebooks-ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/notebooks-ci.yml b/.github/workflows/notebooks-ci.yml index 01d54f235f..f71cc24902 100644 --- a/.github/workflows/notebooks-ci.yml +++ b/.github/workflows/notebooks-ci.yml @@ -215,7 +215,12 @@ jobs: Pillow safetensors tqdm packaging psutil # Converter deps (nbformat for notebook_to_python.py). pip install 'nbformat>=5.10' 'nbconvert>=7.16' - pip install --no-deps unsloth_zoo unsloth + # Install unsloth from the LOCAL checkout (the PR head), not PyPI. + # The PR-time CI must validate the code in this PR; PyPI unsloth + # may lag the in-repo CPU-torch fallback in unsloth/kernels/utils.py + # (lines 162-170) that handles missing torch._C._cuda_getCurrentRawStream. + pip install --no-deps unsloth_zoo + pip install --no-deps -e ./unsloth - name: Convert notebooks for AST scan # Same upstream-conversion-error tolerance as the static job.