Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Kaggle CI: install six beside the Kaggle client, and name an import failure as one (#16374)
Daniel Hanf4cecc379793
diff --git a/.github/scripts/kaggle_t4_ci/collect.py b/.github/scripts/kaggle_t4_ci/collect.pyindex 6c324aa0fc5..24221bab7f2 100644--- a/.github/scripts/kaggle_t4_ci/collect.py+++ b/.github/scripts/kaggle_t4_ci/collect.py@@ -614,6 +614,16 @@ def main() -> int:except BaseException as exc: # noqa: BLE001if isinstance(exc, KeyboardInterrupt):raise+ if args.require_auth and isinstance(exc, ImportError):+ # The client never loaded, so the token was never tried: point at the install.+ _log(f"kaggle client import failed ({type(exc).__name__}: {exc})")+ print(+ "::error title=Kaggle client import failed::the collector could not "+ f"import the Kaggle client ({type(exc).__name__}: {exc}). The token was "+ "never tried; fix the client install step. Nothing was collected or "+ "reaped; dispatched kernels keep billing and their commits stay pending."+ )+ return finish(1)if args.require_auth:_log(f"kaggle auth failed ({type(exc).__name__}) and this pass requires it")print(diff --git a/.github/workflows/kaggle-collect.yml b/.github/workflows/kaggle-collect.ymlindex 61825a9d70c..d8ec0041aae 100644--- a/.github/workflows/kaggle-collect.yml+++ b/.github/workflows/kaggle-collect.yml@@ -63,7 +63,8 @@ jobs:- name: Install the Kaggle client# kaggle 1.7.4.5's authenticate() cannot read KAGGLE_API_TOKEN.- run: python -m pip install --quiet 'kaggle==2.2.4'+ # kaggle imports six without declaring it; python-dateutil 4.0 stopped pulling it in.+ run: python -m pip install --quiet 'kaggle==2.2.4' 'six'- name: Collect this account's kernelsid: collectdiff --git a/.github/workflows/kaggle-t4-notebook-ci.yml b/.github/workflows/kaggle-t4-notebook-ci.ymlindex 035b145689b..f7fe8e5837c 100644--- a/.github/workflows/kaggle-t4-notebook-ci.yml+++ b/.github/workflows/kaggle-t4-notebook-ci.yml@@ -143,7 +143,8 @@ jobs:# kaggle 2.x is required: 1.7.4.5 cannot authenticate with KAGGLE_API_TOKEN, lacks `kernels# delete` (the budget control) and quota_view() (read by gate.py).- name: Install the Kaggle client- run: python -m pip install --quiet 'kaggle==2.2.4'+ # kaggle imports six without declaring it; python-dateutil 4.0 stopped pulling it in.+ run: python -m pip install --quiet 'kaggle==2.2.4' 'six'# budget-hours is the worst case of ONE invocation from launch.py's constants (2 sessions x ~13800s,# ~8 GPU-h); the harness suite recomputes it. reserve-hours 20 caps this leg at 40h spent and is@@ -253,7 +254,8 @@ jobs:# kaggle 2.x is required: 1.7.4.5 cannot authenticate with KAGGLE_API_TOKEN, lacks `kernels# delete` (the budget control) and quota_view() (read by gate.py).- name: Install the Kaggle client- run: python -m pip install --quiet 'kaggle==2.2.4'+ # kaggle imports six without declaring it; python-dateutil 4.0 stopped pulling it in.+ run: python -m pip install --quiet 'kaggle==2.2.4' 'six'# Run the CPU-only harness suites BEFORE pushing; pytest testpaths excludes them, so nothing else# does. Whole directory, not one file. CPU torch must be installed FIRST, or peft pulls CUDA torch anddiff --git a/.github/workflows/kaggle-t4-studio-gpu-ci.yml b/.github/workflows/kaggle-t4-studio-gpu-ci.ymlindex 7571b5ec3f7..081041395ab 100644--- a/.github/workflows/kaggle-t4-studio-gpu-ci.yml+++ b/.github/workflows/kaggle-t4-studio-gpu-ci.yml@@ -135,7 +135,8 @@ jobs:python-version: '3.12'- name: Install the Kaggle client- run: python -m pip install --quiet 'kaggle==2.2.4'+ # kaggle imports six without declaring it; python-dateutil 4.0 stopped pulling it in.+ run: python -m pip install --quiet 'kaggle==2.2.4' 'six'# --kernels 1: this leg pushes one kernel. budget-hours is the full reaper window (derived by the suite).# reserve-hours is 10 rather than the notebook leg's 20; both legs read the same account-wide quota,@@ -223,7 +224,8 @@ jobs:python-version: '3.12'- name: Install the Kaggle client- run: python -m pip install --quiet 'kaggle==2.2.4'+ # kaggle imports six without declaring it; python-dateutil 4.0 stopped pulling it in.+ run: python -m pip install --quiet 'kaggle==2.2.4' 'six'# Resolve to a commit SHA, never a ref: it goes into the kernel slug and launch.py refuses refs.- name: Resolve the ref under testdiff --git a/tests/kaggle/test_fire_and_forget.py b/tests/kaggle/test_fire_and_forget.pyindex 7e5fc353144..26745f527da 100644--- a/tests/kaggle/test_fire_and_forget.py+++ b/tests/kaggle/test_fire_and_forget.py@@ -1159,6 +1159,35 @@ def test_the_collector_installs_the_client_the_gpu_workflows_install():), f"the workflows disagree on the kaggle client: {pins}"+def test_every_kaggle_client_install_also_installs_six():+ """kaggle 2.2.x imports six in kaggle/models/upload_file.py without declaring+ it. python-dateutil < 4 brought it in; 4.0 dropped it, and every collector+ pass then died on ModuleNotFoundError before it reached the token."""+ for path in (NOTEBOOK_WF, STUDIO_WF, COLLECT_WF):+ lines = re.findall(r"pip install [^\n]*'kaggle==[^\n]*", path.read_text(encoding = "utf-8"))+ assert lines, f"{path.name} pins no kaggle client"+ for line in lines:+ assert re.search(r"'six(?:[=<>!~][^']*)?'", line), f"{path.name}: {line}"+++def test_a_client_that_cannot_import_is_not_reported_as_a_bad_token(tmp_path, monkeypatch, capsys):+ """An ImportError means the token was never tried; blaming it sends the+ reader to rotate a secret that is fine while the install stays broken."""++ def _no(*a, **k):+ raise ModuleNotFoundError("No module named 'six'", name = "six")++ monkeypatch.setattr(launch, "_api", _no)+ monkeypatch.setenv("KAGGLE_API_TOKEN", "a-token-that-is-fine")+ monkeypatch.setattr(sys, "argv", ["collect", "--outdir", str(tmp_path), "--require-auth"])+ assert collect.main() == 1+ out = capsys.readouterr().out+ assert "Kaggle client import failed" in out+ assert "No module named 'six'" in out+ assert "Kaggle authentication failed" not in out+ assert "a-token-that-is-fine" not in out++def test_dispatch_refuses_a_ref_that_is_not_a_commit(monkeypatch, capsys):"""`slug_name` falls back to the legacy unattributable form for anything nothex, so a branch here pushes a kernel that runs, bills and reports to