Repository navigation
kev-deploy and kev-finetune: pin KEV_REF to fc4a17e (device probe in a child process #218 #231, compare null diagnostics #217) - #233
Merged
Conversation
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Both published skills install the kev package from a pinned commit:
KEV_REFinskills/kev-deploy/scripts/kev_serve.pyandskills/kev-finetune/scripts/kev_modal.py. On main both pins point at 84847f0 (#214). Three commits have touchedkev/since then, so a user who installs either skill today serves and trains with code main no longer runs. This PR moves both pins to the current tip of main,fc4a17e194bca35a48c57211392ec49ea54a94ac(#231). No SKILL.md or README names the commit (kev-finetune/SKILL.mdonly says "pinned commit"), so only the two constants change.What the pins pick up (
git log --oneline 84847f0..origin/main -- kev/ pyproject.toml uv.lock):serve: isolate accelerator startup probes and allow explicit CPU selection.kev.device.select()runs one small allocation, matmul and sync in a fresh interpreter before any weights load, so a driver crash stays in that child process.kev.servegets--device. CUDA graphs and fused kernels stay on by default, but only on NVIDIA (torch.version.hip is None), because those paths were only ever measured there.device probe: fail closed, try MPS after CUDA, and keep MLX off the torch probe. An explicit--device cudaonkev.train/kev.benchmark/kev.evaluatenow runs the probe and fails closed: it raises instead of falling back to CPU.autotries MPS if CUDA fails. Probe output is read from one marked line, so ROCm startup banners no longer break it.compare: write null diagnostics when none-of-the-above rows are absent.kev.comparewritesnullfor an empty none-of-the-above diagnostic instead of NaN. Neither skill callskev.compare.What this means for each skill:
kev_modal.pylauncheskev.train ... --device cuda --dtype bf16, so every training container now runs the bf16 probe first. That costs one extra torch import in a child process (seconds). The upside: a broken GPU fails the trial before it starts instead of letting it train on CPU.kev_serve.pyandkev_modal.load_servercallCheckpoint.load("cuda", LoadOptions(dtype=bf16, cuda_graphs=True, fused=True))and buildkev.serve.Serverdirectly. They never go throughkev.serve.main()orselect(). The pin still moves so both skills stay on one commit.Serving numbers: not re-measured, and none changed. #218 and #231 touch
kev/serve.pyandkev/device.py, both on the serving list in AGENTS.md. That is why I checked whether the README serving table could be stale:runs/serve-*,runs/grouping-4b-h100*,runs/fused-*) were last committed 2026-09-24 andruns/serving-27b-r23on 2026-09-28. The table section was last edited 2026-10-01 (Kev 1.0 release candidate: the four released checkpoints versioned as one family, with formal cards, a README family table, release notes and an asset builder (nothing published) #206).kev/serve.pychange is inmain(), where the device is picked:_serving_device()before the load instead ofdefault_device(). For an NVIDIA CUDA device theLoadOptionsthat come out are the same as before (bf16, CUDA graphs on, fused when fla is installed,backend="auto"), and the timed request path (Server,kev.model,kev.cuda_graphs,kev.fused_qwen35) did not change. So no released checkpoint's serving path changed: 0.8B on L4, 4B on L40S, 9B on H100, 27B on B200.MODAL_TOKEN_ID/MODAL_TOKEN_SECRET, somodal run modal_app.py::servingcannot run here.runs/serve-08b-l4,runs/serve-4b-l40s,runs/serve-9b-h100andruns/fused-27b-b200. The table and model cards are left as they are and still trace to their committed reports (tests/test_conventions.pypasses).No earlier run of this automation has a PR open: #214 merged and #154 is closed, so this is a new PR rather than a push to an old branch. Nothing under
evals/or any frozen suite is touched.Test plan
git log --oneline 84847f0..origin/main -- kev/ pyproject.toml uv.lock: fc4a17e (device probe: fail closed, try MPS after CUDA, and keep MLX off the torch probe #231), 53cb0b5 (serve: isolate accelerator probes and add an explicit device escape hatch #218), 8ed2a2d (compare: write null diagnostics when none-of-the-above rows are absent #217)uv sync --extra serve(Python 3.12 venv; the box could not download 3.13) anduv run python -m pytest tests/test_skill_scripts.py tests/test_conventions.py -q: 40 passedgit diff 84847f0..origin/main -- kev/serve.py: the only changes are device selection inmain()and the NVIDIA-only guard on the CUDA graph / fused defaults;Serverand the request path are unchangedLink to Devin session: https://app.devin.ai/sessions/0b7ac5485ee34370a00de780897bfc50
Open in Devin Desktop: https://app.devin.ai/desktop/session/0b7ac5485ee34370a00de780897bfc50?variant=devin