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
Give the Studio T4 leg a Kaggle client that can read its own credential (#9535)
Daniel Han0c41e83f33ac
diff --git a/.github/workflows/kaggle-t4-studio-gpu-ci.yml b/.github/workflows/kaggle-t4-studio-gpu-ci.ymlindex 9f33b9ea52a..9e3b9c0719d 100644--- a/.github/workflows/kaggle-t4-studio-gpu-ci.yml+++ b/.github/workflows/kaggle-t4-studio-gpu-ci.yml@@ -286,7 +286,7 @@ jobs:python-version: '3.12'- name: Install the Kaggle client- run: python -m pip install --quiet 'kaggle==1.7.4.5'+ run: python -m pip install --quiet 'kaggle==2.2.4'# The gate itself is shared with the notebook leg, unchanged. Only the# numbers differ.@@ -349,7 +349,7 @@ jobs:python-version: '3.12'- name: Install the Kaggle client- run: python -m pip install --quiet 'kaggle==1.7.4.5'+ run: python -m pip install --quiet 'kaggle==2.2.4'# The ref the kernel clones and tests. For a pull request that is the# head SHA, so the kernel exercises the proposed code and not the mergediff --git a/tests/kaggle/test_studio_gpu_harness.py b/tests/kaggle/test_studio_gpu_harness.pyindex 5875ac90da5..fce7a2c32c2 100644--- a/tests/kaggle/test_studio_gpu_harness.py+++ b/tests/kaggle/test_studio_gpu_harness.py@@ -25,6 +25,7 @@ import importlib.utilimport ioimport jsonimport os+import reimport subprocessimport sysimport tarfile@@ -2261,3 +2262,34 @@ def test_a_box_without_nvidia_smi_reports_no_gpu_rather_than_crashing(tmp_path,assert module.gpu_inventory() == []assert module.nvidia_used_mib() is Noneassert module.nvidia_compute_apps() is None+++def test_the_kaggle_client_is_new_enough_to_read_the_only_credential_we_have():+ """A client that cannot read KAGGLE_API_TOKEN makes this workflow report green forever.++ The gate is handed exactly one credential, KAGGLE_API_TOKEN, and nothing in+ the workflow or under .github/scripts/kaggle_t4_ci writes a kaggle.json. On+ 2.x, authenticate() tries _authenticate_with_access_token() first, which+ reaches kagglesdk.get_access_token_from_env() and reads that variable. On+ 1.7.4.5 it does not: KAGGLE_API_TOKEN appears only in+ kagglesdk/kaggle_http_client.py, whose own header says that client "is not+ currently usable by the CLI", so authenticate() falls through to+ read_config_file() and raises IOError, which IS OSError on Python 3.++ That error is not loud. gate.py turns any error into a skip unless+ --no-soft-fail is passed, and a skip exits 0, so the run is green with the+ GPU job skipped: identical on the surface to the ~95% of invocations the+ 5% sampler declines. Observed on run 32605377065, dispatched with+ force=true to bypass the sampler, which still reported+ "could not authenticate to Kaggle: OSError" and a green workflow.++ The notebook leg has carried this guard since it was written; this leg had+ no equivalent and sat on 1.7.4.5, so it had never authenticated once.+ """+ packaging_version = pytest.importorskip("packaging.version")+ pins = re.findall(+ r"pip install [^\n]*'kaggle==([0-9][^']*)'", WORKFLOW.read_text(encoding = "utf-8")+ )+ assert pins, "no pinned kaggle client in the workflow"+ assert len(set(pins)) == 1, f"jobs disagree on the kaggle client: {pins}"+ assert packaging_version.Version(pins[0]) >= packaging_version.Version("2.2.0"), pins[0]