Repository navigation
Restore frozen Miles image names and name images by fork commit - #343
Merged
Fred Robinson (frrad) merged 7 commits intoNov 17, 2026
Merged
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]>
Fred Robinson (frrad)
force-pushed
the
fix/restore-frozen-miles-image-names
branch
from
November 17, 2026 20:27
77a3932 to
7016a13
Compare
- 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]>
Fred Robinson (frrad)
marked this pull request as ready for review
November 17, 2026 20:57
Fred Robinson (frrad)
requested review from
Kailash Ranganathan (kailash109) and
Micah Yong (micahtyong)
as code owners
November 17, 2026 20:57
…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
Kailash Ranganathan (kailash109)
approved these changes
Nov 17, 2026
Kailash Ranganathan (kailash109)
left a comment
Collaborator
There was a problem hiding this comment.
overall lgtm, there is one thing related to checkpoint compability:
Checkpoints created on main after #324 require a custom image pinned to their original Miles commit. The new squash-merged commits have different hashes, so even identical code won’t pass checkpoint revision validation. This is explicitly documented.
but i dont think this is a pressing issue (no one has checkpoints from prior versions that they're tied to i think)
Fred Robinson (frrad)
deleted the
fix/restore-frozen-miles-image-names
branch
November 17, 2026 23:44
This was referenced Nov 18, 2026
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
Users choose trainer images by name in their configs, for example
trainer_image = "miles-v0.1.1-fdd808c". A name is the upstream Miles release plus the short commit of the Spindle Miles fork that the image installs. Named images are frozen: a change gets a new name, so a config keeps running exactly what it was tested on. Miles checkpoints depend on this too. A checkpoint restores only on a trainer with the same Miles revision as the one that saved it (_validate_checkpointinmiles_lora.py).#324 (seeded LoRA initialization) changed the fork commit behind four existing names without renaming them:
miles-v0.1.1-fdd808c(also themilesdefault)fdd808cce494f0miles-v0.1.2-f2f8447f2f8447fde5e9emiles-v0.1.2-464efc9-glm53464efc9612703amiles-v0.2.0-15afe2115afe21384d73bSo each suffix named the wrong commit, and checkpoints saved on these names before #324 no longer restored. The new commits also weren't on the fork branches. Three were open PRs; the DeepSeek-V4.1 one (
fde5e9e) only existed on a branch with no PR.This PR:
Points each old name back at its original commit, and adds a seed-enabled name for each, pinned to the commit merged on the fork branch. Final registry:
miles-v0.1.1-fdd808cfdd808c008175d4895fd8c57c95ef4fa5bb6a2a0miles-v0.1.1-52a7a9952a7a99d9f9e6188ece91a0583ef417093601025ce494f0miles-v0.1.2-f2f8447f2f8447c33ac0755a0988c30d413d334dea0a26amiles-v0.1.2-99e1ebe99e1ebe8e86974e0b3c290f47f415ee47726f965spindle-miles-v0.1.2(see below)miles-v0.1.2-464efc9-glm53464efc9781bbf8edf2135f0857f5aa417685eae2miles-v0.1.2-99e1ebe-glm5399e1ebe8e86974e0b3c290f47f415ee47726f965612703amiles-v0.2.0-15afe2115afe217019b2762290da27a31a92454051a0d34miles-v0.2.0-8c5de268c5de2650a6876c2ca17ff221c7e0ba8a2d7b84a3280b7a)DeepSeek-V4.1 (
miles-v0.1.2-99e1ebe).fde5e9ewas never merged. Experiment (not for merge): drop the checkpoint-volume commit after sampler weight export #43 merged the same seed patch ontospindle-miles-v0.1.2:git diff 464efc9 99e1ebeis byte-identical togit diff f2f8447 fde5e9e. Betweenf2f8447and99e1ebe, the branch also carries the GLM-5.3 work from miles#31. That work is inert in the plain v0.1.2 build. Its Bridge provider registers only when/opt/miles-glm53-modelsexists, which only the-glm53build steps create. Its HF config alias change turns an error into a skip. The build check formiles_plugins/models/deepseek_v4_1/lora.pystill holds at99e1ebe.Keeps seed support for defaults and bundled configs.
milesdefault is nowmiles-v0.1.1-52a7a99.miles-v0.1.1-fdd808cmove tomiles-v0.1.1-52a7a99.miles-v0.1.2-99e1ebe, and the 4 GLM-5.3 Flash configs tomiles-v0.1.2-99e1ebe-glm53.miles-v0.2.0-*. The reference runreference_runs/results/dapo-math-qwen35-4b-miles-v020stays onmiles-v0.2.0-15afe21: it was recorded before Support seeded LoRA initialization through Miles #324, so the restored name matches what it ran.Names image variables after their fork commit, and modules after their Miles release.
miles_image.pyis nowmiles_v011_image.py, matchingmiles_v012_image.pyandmiles_v020_image.py.glm53_trainer_image.pybuilt from the same v0.1.2 release image and fork branch asmiles_v012_image.py, so its images moved there as a second series (glm53_image_01_464efc9,glm53_image_02_99e1ebe) with unchanged build commands. Each Miles module has animage_at(commit)builder and one variable per commit, numbered in ancestry order:image_01_fdd808c,image_02_52a7a99and so on. The SGLang modules follow the same pattern (rollout_image.image_01_c4182b2,image_02_803bccb;deepseek_v41_image.image_01_a3e0e17;glm53_image.image_01_c4182b2). Each module has a one-line comment saying entries are only ever appended, and each shared builder says editing it rebuilds every image built from it. Registry strings are unchanged apart from the four new names. The restored names use the same build commands as before Support seeded LoRA initialization through Miles #324, so Modal should reuse their cached layers.Adds regression tests in
tests/providers/test_deployment_apps.py:image_NN_<short>variable must build a commit starting with<short>, and the numbers in each series (image_,glm53_image_, ...) must run 01, 02, ... in order.-glm53names may point at GLM-5.3 images. Swappingmiles-v0.1.2-99e1ebewith its-glm53twin, or the twoc4182b2sampler images, fails it.MILES_BRANCHorSGLANG_BRANCH). The test fetches each branch's commits from GitHub withgit fetch --filter=tree:0, about a second per branch, and checks ancestry. It runs on every PR. The GLM-5.3 trainer and DeepSeek-V4.1 sampler modules now name their branch in a constant too; their build commands are unchanged.I checked the first two by mutation. Repinning
image_01_fdd808cto another commit fails the first test, and pointingmiles-v0.1.2-f2f8447at the seed image fails the second. The third failed for all four unmerged seed commits before this PR switched to the merged ones.Links each registered image to its fork PR with a comment above each
TRAINER_IMAGESandSAMPLER_IMAGESentry.Removes
scripts/check_multi_targets_gpu.pyand its only worker,tests/gpu/multi_targets_worker.py.Updates the Miles commit lookup in CI's upstream type-check step. It now reads the newest
image_at(...)commit inmiles_v011_image.py(52a7a99, which has the same tree as main'sce494f0), becauseMILES_COMMITno longer exists. Updatesdocs/deployment-configs.md#imagesand the CHANGELOG.Checkpoints and upgrades
A checkpoint restores only on the Miles revision that saved it.
fdd808c,f2f8447and464efc9. Every bundled config and the default now install a seed-enabled commit, so a v0.1.7 checkpoint won't restore on a bundled config. That has been true on main since Support seeded LoRA initialization through Miles #324. The CHANGELOG now says to settrainer_imagetomiles-v0.1.1-fdd808c,miles-v0.1.2-f2f8447ormiles-v0.1.2-464efc9-glm53to restore one.ce494f0,fde5e9e,612703aor384d73b). No built-in name installs those commits, including52a7a99and99e1ebe, which have the same files but different hashes. Those checkpoints restore only with a custommodule:attributeimage at that commit. Neither Support seeded LoRA initialization through Miles #324 nor Pin frozen, commit-named images in every bundled config #313 is in a tagged release, so this affects only deployments built from main.The seed error now says to switch
trainer_imageto a seed-enabled image rather than "update Miles", since named images are frozen.Testing
On commit be9c523:
uv sync --locked --python 3.12anduv run pre-commit run --all-filespass../rust/router),uv run --no-sync pytest -q -n autopasses: 1477 passed and 9 skipped, including slow tests and the network branch test.No images were built and nothing ran on GPUs. In particular, DeepSeek-V4.1 hasn't been trained on
99e1ebe. The seed patch is identical to what #324 shipped, and the extra GLM-5.3 changes are gated off in the plain build, but a DeepSeek LoRA run onmiles-v0.1.2-99e1ebewould confirm it.🤖 Generated with Claude Code