Repository navigation
Refactor reference run configuration and catalog tooling - #372
Conversation
#324 moved the fork commit behind miles-v0.1.1-fdd808c, miles-v0.1.2-f2f8447, miles-v0.1.2-464efc9-glm53 and miles-v0.2.0-15afe21 to add seeded LoRA initialization. Named images are frozen, and Miles checkpoints restore only on the revision that saved them, so this broke both the name and checkpoint restore for anyone pinned to one of those names. Point each old name back at its original commit and register the seed commits under new names (miles-v0.1.1-ce494f0, miles-v0.1.2-fde5e9e, miles-v0.1.2-612703a-glm53, miles-v0.2.0-384d73b). The Miles default and every bundled Miles config move to the new names, so they keep seed support. Image modules now define one variable per fork commit, numbered in ancestry order (image_01_fdd808c, image_02_ce494f0, ...), built by an image_at helper. Tests check that each variable builds the commit it is named after and that each registered name points at the variable for its commit. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Each Miles and SGLang image module names the fork branch it builds from. Fetch each branch (commits only) and check that every pinned commit is an ancestor of its head, so an image cannot pin a commit that exists only on an unmerged branch and could disappear when that branch is deleted. The GLM-5.3 trainer and DeepSeek-V4.1 sampler modules now name their branch in a constant too. Their build commands are unchanged. This test fails until the seed commits ce494f0, fde5e9e, 612703a and 384d73b are merged onto their spindle-miles* branches. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The fork PRs for seeded LoRA initialization were squash-merged, so the commits Spindle pinned are not on the spindle-miles* branches. Pin the merged commits instead: - miles-v0.1.1-52a7a99 (modal-projects/miles#42; same tree as ce494f0) - miles-v0.1.2-99e1ebe-glm53 (modal-projects/miles#43; same tree as 612703a) - miles-v0.2.0-8c5de26 (modal-projects/miles#44, after Beam LoRA support #37) The DeepSeek-V4.1 seed commit fde5e9e was never merged. Its seed patch is identical to the one #43 merged onto spindle-miles-v0.1.2, so the plain v0.1.2 image uses that branch head, 99e1ebe, as miles-v0.1.2-99e1ebe. The GLM-5.3 changes between f2f8447 and 99e1ebe only take effect in the glm53 build. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…mages into the v0.1.2 module miles_image.py builds Miles v0.1.1; name it like miles_v012_image.py and miles_v020_image.py. glm53_trainer_image.py built from the same v0.1.2 release image, fork repository and branch as miles_v012_image.py, so its images now live there as a second series (glm53_image_01_464efc9, glm53_image_02_99e1ebe). Build commands are unchanged. The sequence test now numbers each series separately. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- CHANGELOG: bundled configs and the default now install newer Miles commits than v0.1.7 did, so say which image name restores a checkpoint saved with v0.1.7 or earlier. - The seed error now says to switch trainer_image to a seed-enabled image rather than to update Miles, since named images are frozen. - The name-matching test now also checks the -glm53 suffix, so swapping an image with its GLM-5.3 twin on the same commit fails. - Each shared image builder says that editing it rebuilds every image built from it. - Wording fixes in the docs, and the append-only comment in glm53_image.py. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…t GPU script Each TRAINER_IMAGES and SAMPLER_IMAGES entry now notes the modal-projects fork PR that last changed its commit, so readers can see what each name adds. Remove scripts/check_multi_targets_gpu.py and its only worker, tests/gpu/multi_targets_worker.py, along with their ruff ignores and mentions in the spindle-dev skill. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…les-image-names # Conflicts: # tests/gpu/multi_targets_worker.py
…of GPU memory (#357) Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Reuse the stock Tinker workload with a pinned tokenizer and the existing TP2/CP8 H200 topology. Keep the response cap at 2048 tokens; this is not a 256K-context validation. Record no execution until a GPU run exists. Enable Miles v0.2.0 multi-node captures by committing each node's files before coordinator reload and sharing the checkpoint I/O lock for volume-backed captures, including their metadata writes. Local captures keep their independent persistence path. Adapt the generic backend changes from #252 commits 53f80f7, 594edf2 and 18054ed, with its owner's agreement. Leave Beam recipes and images out.
| runpy.run_module(sys.argv[0], run_name="__main__", alter_sys=True) | ||
| else: | ||
| sys.argv = sys.argv[1:] | ||
| sys.path.insert(0, str(Path(sys.argv[0]).resolve().parent)) |
There was a problem hiding this comment.
why did we have to do this?
There was a problem hiding this comment.
Curious what the answer is to this
There was a problem hiding this comment.
The proxy wrapper runs the target with runpy.run_path(), which does not add the target script's directory to sys.path the way python path/to/script.py does. This PR moves the shared schema into reference_runs/catalog.py, so wrapping reference_runs/run.py would otherwise fail with ModuleNotFoundError: No module named 'catalog'.
The added line gives wrapped scripts the same sibling-import behavior as direct execution. test_proxy_wrapper_supports_scripts_with_sibling_imports covers this by launching the wrapper from another directory and checking that the target can import a helper beside it.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Summary
Refactor the reference launcher and plotter to share a typed catalog schema. Deployment overrides use declared fields, the existing DAPO definition pins its tokenizer, and workload arguments come only from TOML. Indexed outputs require definitions directly under this checkout's
reference_runs/configs/, so catalog names identify their definitions. SuccessfulSystemExit(0)orSystemExit(None)script exits still register; unsuccessful exits retain metrics without registration. The shared-server proxy wrapper adds the target script directory to the import path, so the launcher can import its sibling catalog module as it does when invoked directly with Python.Successful outputs under this checkout's
reference_runs/outputs/directory register automatically. Scratch outputs stay uncatalogued, including with--index. Process locks reserve run IDs and canonical output paths through the workload; completion updates use a short index lock and atomic replacement. Failed runs retain their metrics without an index entry.Catalog entries record server-reported Spindle commit and version from the stock Tinker SDK's
get_server_capabilitiesrequest. The SDK's raw-response mode preserves those fields while retaining its authentication headers and retries. Unreported metadata stays absent. Image, hardware and region fields describe the configured recipe. Existing recorded runs and the execution index remain unchanged.Testing
Validation commit:
942c3ff6b07c6471842f7052b2e4ae88f2e09551.uv sync --locked --python 3.12.uv run pre-commit run --all-files: passed.torch==2.10.0and the local Rust router extension installed in this checkout's own virtual environment.uv run --no-sync pytest -q: 1,587 passed, 10 skipped (115.35 seconds); 47 reference-tooling tests passed.uv buildpassed on5c80fc32; the router and packaged source are unchanged.CPU tests cover competing processes, failed-run retention, canonical/scratch paths, symlink escapes, default/custom indexes, tokenizer selection, rejected CLI passthrough, proxy-wrapper sibling imports, and capability metadata through the stock SDK raw-response path with a fake HTTP transport. The existing DAPO workload runs through two updates with fake training/sampling and real SDK data types. The repository review checklist was applied, starting with process races and lifecycle behavior. An independent clean-context reviewer found two issues; both were fixed and the follow-up review had no remaining findings.
No GPU workload or tinker-cookbook run was executed on this tooling commit.