Skip to content

Kaggle Studio GPU CI: request hardware detection after sign-in - #16728

Merged
danielhanchen merged 3 commits into
mainfrom
kaggle-ci-request-hardware-detection
Nov 5, 2026
Merged

danielhanchen merged 3 commits into
mainfrom
kaggle-ci-request-hardware-detection

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Summary

The Kaggle T4 Studio GPU check (kaggle-studio-gpu) has failed on every run since #16469 made the startup ML warmup opt-in, on main as well as on PRs: studio_ready: Unsloth never became ready: timed out after 421s.

Cause: without the hardware warmup, /api/health reports hardware_detecting: true together with hardware_detection_deferred: true, and detection only starts on an authenticated GET /api/health?detect_hardware=true (what the UI sends after sign-in). The harness polled the unauthenticated endpoint and waited for hardware_detecting to clear, which never happens, so it timed out while the server sat healthy.

Fix (harness only):

  • health_is_ready treats a deferred detection as up (the server is idle, waiting for the request).
  • New hardware_detected keeps the old strict check (healthy and no detection pending).
  • After a successful sign-in, authenticate requests detection with detect_hardware=true and waits for the verdict within the existing health deadline, so training and export still run only after detection, as before. A detection that never finishes fails authenticate with the last health payload.

No Studio code changes.

Tests

  • tests/kaggle/test_studio_gpu_harness.py: 188 passed, with new assertions for the deferred payload (health_is_ready true, hardware_detected false).
  • Real check: kaggle-t4-studio-gpu-ci dispatched on this branch; the result is posted as the kaggle-studio-gpu status on the head commit.

Since #16469 the startup hardware warmup is opt-in, so /api/health keeps hardware_detecting set
(with hardware_detection_deferred) until an authenticated detect_hardware=true request, which the
harness never sent: every run timed out in studio_ready. A deferred detection now counts as up, and
the harness asks for detection after login and waits for the verdict, as the UI does.
@danielhanchen danielhanchen self-assigned this Nov 5, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-05T06:30:11.847811Z f3e0e0f Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

…he key check

With hardware detection deferred, /api/health is ready before the CLI's model finishes loading,
so the first completion got 'No model loaded'. Retry that answer while the process lives, up to
the health deadline.
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: f3e0e0fee5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen
danielhanchen merged commit 7ec4b20 into main Nov 5, 2026
@danielhanchen
danielhanchen deleted the kaggle-ci-request-hardware-detection branch November 5, 2026 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant