Skip to content

Pack the Studio GPU smoke into the T4 kernel so its install hides behind the legs - #9561

Closed
danielhanchen wants to merge 4 commits into
mainfrom
ci/kaggle-merge-studio
Closed

danielhanchen wants to merge 4 commits into
mainfrom
ci/kaggle-merge-studio

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

The Studio payload is ~0.75 GPU-h standalone and most of that is CPU work:
clone, pip, a Playwright browser download. The notebook kernel meanwhile spends
646.3s with both T4s busy and nothing at all using the CPU.

So the payload is split in half and packed into the same kernel. The install
half takes no card and starts at t=0 beside the four training legs; the GPU
half waits for the card queue to drain and then takes both cards. Simulated
against the measured per-leg durations from run 32607621452:

studio_install.ipynb - 0.1 -> 400.1
t4_gptoss.ipynb gpu0 0.1 -> 384.2
t4_frontier.ipynb gpu1 5.2 -> 312.3
t4_canary.ipynb gpu1 312.3 -> 503.8
t4_control.ipynb gpu0 384.2 -> 563.2
studio_test.ipynb - 563.3 -> 763.3

The install is fully hidden: it finishes at 400.1s inside a 646.3s card queue.
Makespan 763.3s against 646.3s, so ~0.21 GPU-h against ~0.18, still under the
0.25 h envelope every figure in the budget block is derived from. No same-card
overlap.

What this does not do: it does not widen the paths filter, and it does not
change kaggle-t4-studio-gpu-ci.yml. A studio/** change still gets its dedicated
standalone run on its own budget. This is the same payload answering for the
events the notebook workflow already triggered on, bought for 0.03 h.

The install half is a gate as well as a lane. If it fails, the GPU half is
skipped rather than run against a Studio that is not there, and the skip is
reported rather than silent.

Two reporters now read one evidence directory, each rendering only the labels
it owns: four training legs, or one studio-gpu payload. Each also recomputes
its own verdict rather than reading the launcher's kernel-wide one, because a
failing training leg would otherwise print "Studio GPU smoke: FAIL" above a
section listing zero failures and send someone to the wrong half of a
13-minute kernel. The T4 reporter is told the LEG count, not the payload count,
since it filters the Studio report out before comparing.

Guards, each mutation-tested by reintroducing the bug it catches: the build
step still passes --with-studio; both reporters and the evidence collector run;
the T4 reporter gets legs and not payloads; a failing payload reddens only
the reporter that owns it, in both directions; the CPU lane never takes a card;
Studio is excluded from the card queue; the install-failure gate holds.

danielhanchen and others added 2 commits August 23, 2026 07:48
…ind the legs

The Studio payload is ~0.75 GPU-h standalone and most of that is CPU work:
clone, pip, a Playwright browser download. The notebook kernel meanwhile spends
646.3s with both T4s busy and nothing at all using the CPU.

So the payload is split in half and packed into the same kernel. The install
half takes no card and starts at t=0 beside the four training legs; the GPU
half waits for the card queue to drain and then takes both cards. Simulated
against the measured per-leg durations from run 32607621452:

  studio_install.ipynb    -       0.1 -> 400.1
  t4_gptoss.ipynb         gpu0    0.1 -> 384.2
  t4_frontier.ipynb       gpu1    5.2 -> 312.3
  t4_canary.ipynb         gpu1  312.3 -> 503.8
  t4_control.ipynb        gpu0  384.2 -> 563.2
  studio_test.ipynb       -     563.3 -> 763.3

The install is fully hidden: it finishes at 400.1s inside a 646.3s card queue.
Makespan 763.3s against 646.3s, so ~0.21 GPU-h against ~0.18, still under the
0.25 h envelope every figure in the budget block is derived from. No same-card
overlap.

What this does not do: it does not widen the paths filter, and it does not
change kaggle-t4-studio-gpu-ci.yml. A studio/** change still gets its dedicated
standalone run on its own budget. This is the same payload answering for the
events the notebook workflow already triggered on, bought for 0.03 h.

The install half is a gate as well as a lane. If it fails, the GPU half is
skipped rather than run against a Studio that is not there, and the skip is
reported rather than silent.

Two reporters now read one evidence directory, each rendering only the labels
it owns: four training legs, or one studio-gpu payload. Each also recomputes
its own verdict rather than reading the launcher's kernel-wide one, because a
failing training leg would otherwise print "Studio GPU smoke: FAIL" above a
section listing zero failures and send someone to the wrong half of a
13-minute kernel. The T4 reporter is told the LEG count, not the payload count,
since it filters the Studio report out before comparing.

Guards, each mutation-tested by reintroducing the bug it catches: the build
step still passes --with-studio; both reporters and the evidence collector run;
the T4 reporter gets `legs` and not `payloads`; a failing payload reddens only
the reporter that owns it, in both directions; the CPU lane never takes a card;
Studio is excluded from the card queue; the install-failure gate holds.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b53b5d6fe1

ℹ️ 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".

--per-run-timeout 3300 \
--with-studio \
--studio-args "--max-steps 8" \
--per-run-timeout 3900 \

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Raise the kernel ceiling for the merged workload

When the packed run takes longer than an hour, this 3900-second child timeout is unreachable because the launch step still passes --kernel-timeout-sec 3600, and the Studio test phase starts only after the T4 queue drains. Kaggle can therefore terminate the session before either this timeout or the later Studio assertions complete; the missing report is classified as a green partial/infra result. The standalone Studio workflow grants the same payload a 4200-second kernel ceiling, so the merged workflow should provide at least that ceiling (plus the preceding T4 work) or reduce the advertised per-run allowance.

Useful? React with 👍 / 👎.

expected_gpus = min(len(payloads), SESSION_GPUS)
cpu_lane = after_gpu = None
if studio:
payloads.update(studio_payloads(**studio))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Validate Studio payload files before packing

When a required Studio harness file is renamed or removed, this integration bypasses the validation in .github/scripts/kaggle_studio_ci/build_kernel.py:528-531 because it calls build_payload_notebook() directly without checking PAYLOAD_FILES. The merged workflow will consequently build and launch a paid GPU kernel, and the missing runtime script can produce no Studio report and be downgraded to a green partial result, instead of failing on the runner before launch as the standalone builder does. Pass the Studio payload directory into this path and apply the same required-file check before adding the notebooks.

Useful? React with 👍 / 👎.

# Conflicts:
#	.github/scripts/kaggle_studio_ci/build_kernel.py
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 1, 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-09-01T01:48:17.730151Z 42e6196 New commits
ℹ️ 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.

@danielhanchen

Copy link
Copy Markdown
Member Author

Closing this as absorbed into #9700, not as rejected. Everything here is landing; it is landing from one branch instead of four.

Why

ci/kaggle-latest-compile (#9700) carries this PR's content already. Checked three ways rather than by reading the titles:

Line-level check of each PR's own payload against #9700's tree: 634/657 added lines for #9561, 1198/1236 for #9568, 2088/2135 for #9596. Every miss was read individually and each is a line #9700 edited further; no concept is absent (AFTER_GPU, CPU_LANE, MAX_LEGS_PER_CARD, _ov_dir, --chat-model / --train-model, export_gguf, studio_concurrent, SMOKE_FILES, PREBUILT_MARKER all present).

The one thing that was not absorbed, and now is

e1873c1d on ci/kaggle-studio-concurrent corrected the GRPO note from "one in four" to the measured 4 in 9, and #9700 still had the stale text. Carried over in beae2337, with one sentence deliberately dropped: the original ends "a nightly kernel is where this belongs, and that scheduling does not exist yet", which is false on #9700 because that branch built the nightly and dispatches grpo,multi_gpu on the schedule.

Landing these separately would mean resolving the same 15 files twice from divergent copies, and the merge could silently reinstate the symlink-following _repo_bytes that reports roughly 2x the bytes actually transferred. One carrier avoids both.

The branch is not deleted, so nothing here is lost if #9700 has to be split back up.

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