Skip to content

docs(flash): move the flash lane to the Runpod SDK 2.0 (rp flash) - #89

Open
justinwlin wants to merge 9 commits into
mainfrom
docs/flash-to-runpod-sdk-2
Open

justinwlin wants to merge 9 commits into
mainfrom
docs/flash-to-runpod-sdk-2

Conversation

@justinwlin

@justinwlin justinwlin commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Flash → SDK 2.0 fix stack

Independent PRs off main; merge in this order. Status as of 2026-10-21.

# PR Fixes Status Needs
1 runpod/runpod-python#627 CI: e2e failing on main ✅ Merged 2026-10-19 —
2 runpod/runpod-python#623 GPU crash loop: torch pulled in by peft/accelerate gets bundled 🟢 Approved, CI green, up to date with main nothing
3 runpod/runpod-python#624 Workers land on GPUs you didn't request (whole pools) 🟢 Approved, CI green, up to date with main nothing
4 runpod/runpod-python#625 rp flash dev leaks endpoints when stopped by a signal 🟢 Approved, CI green, up to date with main nothing
5 runpod/runpod-python#626 vol.path says "not mounted" on deployed workers 🟢 Approved, CI green, up to date with main nothing
6 runpod/runpod-python#628 Account API key copied into every endpoint ⛔ Closed: superseded by runpod/runpod-python#644 (per-app worker key) —
7 — Release runpod with 2–5 ⏳ 2.0.0rc2 shipped 2026-10-20 without 2–5; they need the next release 2–5 merged
8 runpod-workers/sdk-runtime#1 Rebuild runtime images (dev sessions run an old SDK) 🟡 Open, review required, docker check failing independent
9 👉 #89 (this PR) Plugin docs for the fixed SDK + VolumeCache 🟡 Open, review required, CI green the release in row 7 (its >=2.0.0rc2 pin moves to it)

Flash ships in runpod 2.0 as SDK apps (runpod.App, rp flash), and runpod-flash is deprecated on October 29, 2026. Until this PR, the plugin taught only runpod-flash.

Merge after runpod 2.0.0rc2 is on PyPI. The docs pin runpod>=2.0.0rc2 and assume the SDK fixes in runpod/runpod-python#623–#628.

What changes

  • flash skill rewritten SDK-first. It checks which SDK a project is on, and new references cover migrating from runpod-flash and maintaining legacy projects.
  • flash/examples/: five single-file apps, all passing live.
  • Evals rewritten for the SDK, plus a new migration eval.
  • flash concept rules rewritten with public-doc and live evidence; the rules that cite them are updated.
  • Router, READMEs and getting-started use rp login / rp flash.
  • Golden paths 03-B, 07 and 08 ported to the SDK and re-verified live.
  • VolumeCache guidance beyond the SDK port (global volumes, measured numbers, golden paths 08/09) moved to docs(volume-cache): load volume-backed models through VolumeCache on the Runpod SDK #90, stacked on this PR.

No SDK workarounds left. With rc2:

  • Torch pulled in by peft/accelerate stays out of the bundle, so those are plain dependencies.
  • GPU device names pin exact devices.
  • vol.path works on deployed workers.
  • kill cleans up a background dev session.
  • Only workers that call other resources get the API key.

Remaining gotchas are behavior, not bugs: whole-number floats arrive as ints, and dev sessions run the runtime image's own runpod.

Live verification

2026-10-16, runpod 2.0.0rc1:

Item Mode Result
queue_gpu, api_model_service, cpu_gpu_pipeline, train_then_serve rp flash dev --once pass
call_deployed against deployed apps pass
Golden path 03-B (whisper) dev Gettysburg transcript
Golden path 07 (volume handoff) deploy write → read on a network volume

2026-10-17, a local runpod build with #623–#628 merged (1509 SDK tests pass):

Item Result
Golden path 08 serve step, peft + accelerate as plain dependencies, vol.path for the adapter image torch 2.9.1+cu128, generated text. This run also wrapped the base-model load in VolumeCache (#90); here the base model loads from the mount as in the 2026-10-16 run

All test endpoints and volumes were deleted. Repo checks: ontology validate (0 errors), check:guides, links, branding, frontmatter, versions, marketplace, CLI absence claims, migrate checks.

How we tested and compared
  • Workarounds vs. no workarounds. Each SDK workaround the rc1 docs carried was first reproduced on rc1:

    • pip install --no-deps at runtime for peft (rc1 crash-looped with libcudart.so.13)
    • literal /runpod-volume instead of vol.path (rc1 raised "not mounted")
    • a SIGINT-restoring wrapper for kill (rc1 left the endpoint running)

    The same golden paths and examples were then re-run on a local build with #623–#628, with the workaround removed. The doc changed only where that run passed.

  • Docs vs. SDK source. A Codex review checked every SDK claim in the diff against the SDK at v2.0.0rc1 and the fix branches. Concept rules cite the public docs or the SDK source line.

Review (Codex, two rounds)
Finding Resolution
Docs said .remote() has no timeout. On a queue, it stops waiting after 300 s (DEFAULT_TIMEOUT_SECONDS) while the job keeps running Fixed: api.md, flash.yaml (flash.client-limits, with SDK evidence) and golden path 03-B now say 300 s on a queue and point to .spawn() + job.result(timeout=...) for longer calls. Task calls have no client timeout, so the claim is scoped to queues.
Docs said sibling modules are never shipped. Deploy packages the project directory, and only dev ships the single module Fixed: SKILL.md (intro and gotcha 2) and flash.same-module-in-dev-and-deploy scope the one-file rule to dev sessions, with deploy.py evidence.

Flash ships in runpod 2.0 as SDK apps (runpod.App, @app.queue/@app.api/@app.task)
with the rp CLI, and runpod-flash is deprecated on October 29, 2026.

- flash skill: SDK-first SKILL.md, setup/CLI, API and patterns references
  checked against runpod 2.0.0rc1 (--help, source, sdk-runtime)
- new references: migrate-from-runpod-flash.md, runpod-flash-legacy.md
- examples/: five single-file apps, each passing rp flash deploy --build-only
- evals rewritten for the SDK, plus a migration eval; dev-loop fixture now
  fails on a missing dependency (the body-only NameError no longer exists)
- flash concept rules rewritten with public docs/source evidence; citing
  rules in flashboot, job, model-store, runpodctl, serverless-handler and
  volume-cache updated
- router, READMEs, getting-started and endpoint/pod references use rp
- golden paths 03-B, 07, 08 ported to the SDK and marked ported (build-only
  checked; the live runs used runpod-flash)
A non-interactive shell starts & jobs with SIGINT ignored, and SIGTERM exits
rp flash dev without deleting its temporary endpoints. Verified live: the
python exec wrapper restores SIGINT and the session reports its endpoints deleted.
- examples: queue_gpu, api_model_service and cpu_gpu_pipeline pass rp flash dev
  --once live; cpu_gpu_pipeline now casts to float32 because whole-number
  floats cross the job boundary as ints
- golden path 03-B live-verified on the SDK; pin av<19 (PyAV 19 dropped the
  metadata_errors argument faster-whisper passes)
- gotcha 14: dev-session runtime images predate runpod.NetworkVolume, so volume
  apps (train_then_serve, golden paths 07 and 08) fail in rp flash dev
Deployed SDK workers attach the network volume, but on the current runtime
images vol.path raises 'is not mounted in the current execution'. Reading the
literal mount path works: on 2026-10-16 one deployed endpoint wrote to a volume
and another read the exact contents back. Golden paths 07 and 08 and
train_then_serve.py now read literal paths and run via rp flash deploy.
…ment deploy crash loop

- golden path 08 serve step verified via rp flash deploy (TinyLlama + LoRA from
  a network volume); call_deployed.py verified against deployed apps
- gotcha 13: torch-dependent packages (peft, accelerate, sentence-transformers)
  vendor a CUDA 13 torch that replaces the image's and crash-loops GPU workers
  (libcudart.so.13); install them with pip --no-deps at runtime (08 shows how)
- patterns.md drops accelerate from GPU examples for the same reason
- api.md: rp flash deploy maps GPU names to whole pools; pin after deploy
- concept rules flash.transitive-torch-breaks-gpu-deploy and
  flash.deploy-gpu-names-map-to-pools with live-probe evidence
The volume version could not run in a dev session on the current runtime
images. The task now returns its weights as JSON to the queue endpoint (the
volume handoff is covered by golden path 07). Verified 2026-10-16 with
rp flash dev --once: the task Pod trained, predict returned f(2.0) = 7.00, and the
Pod and endpoint were cleaned up.
Assumes runpod 2.0.0rc2, which carries the SDK fixes for these issues:
- The build leaves torch out even when a dependency pulls it in, so
  golden path 08 lists peft and accelerate directly and the --no-deps
  workaround and its gotcha are gone.
- GPU device names pin exact devices, so the set-endpoint-gpus advice
  is gone.
- vol.path works on deployed workers.
- Dev sessions clean up on kill or SIGINT, so the SIGINT wrapper is gone.
- Only workers that call other resources get the API key.
Install pins move to runpod>=2.0.0rc2. Concept rules are replaced to
match.
@justinwlin
justinwlin force-pushed the docs/flash-to-runpod-sdk-2 branch from bcb59eb to 4cbbe30 Compare October 21, 2026 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant