Repository navigation
Restore Miles checkpoints across fork commits of the same format - #382
Conversation
|
|
||
| class Config(Parent): | ||
| name = "qwen35-4b-lora-32k-attn-only" | ||
| trainer_image = "miles-v0.1.1-fdd808c" |
There was a problem hiding this comment.
Why this change? Is this a good default or do we want to recommend a 0.2.0 version? Maybe add a test to enforce this stays up to date / continues to refer to a version which exists?
There was a problem hiding this comment.
Yeah this change was not needed; reverting.
| result = self._call(coroutine) | ||
| out_of_memory = isinstance(result, dict) and result.get(OUT_OF_MEMORY) | ||
| if not out_of_memory: | ||
| refused = None if out_of_memory else _refusal(result) |
There was a problem hiding this comment.
nit, seems weird for refused to be dependent on oom status.
| args.delay_split_train_data_by_dp = True | ||
|
|
||
|
|
||
| def _refusal(result) -> str | None: |
There was a problem hiding this comment.
maybe add a test or two to document what the shape of the input is expected to be here?
| raise ValueError("checkpoint topology does not match deployment") | ||
| if restore_optimizer and not metadata.get("has_optimizer"): | ||
| raise ValueError("checkpoint does not include optimizer state") | ||
| if metadata.get("miles_revision") != self.runtime.revision: |
There was a problem hiding this comment.
Maybe add some narrative here like "this checkpoint was saved with a different version of miles than the one it is being loaded with"
Also, do you think it's worth trying to track / prevent things from being loaded by versions which are older than they were generated with?
There was a problem hiding this comment.
Yep we can warn users that they're loading a checkpoint from a newer Miles version.
worth trying to track / prevent things from being loaded by versions which are older than they were generated with?
It looks like Miles v0.2.0 already handles this case (ex). In fact, it looks like Miles v0.2.0 handles a lot of the versioning checks we added in the past few days
A commit mismatch now logs spindle_checkpoint_revision_mismatch instead of rejecting the restore; format, layout, model, LoRA and topology checks still gate it. A load that Miles refuses as a user error fails only that request instead of stopping the trainer. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…explain the mismatch warning Keep the 0.1.7 restore examples on miles-v0.1.1-fdd808c. Co-Authored-By: Claude Opus 5.5 <[email protected]>
e18d4fe to
ec3bc55
Compare
Summary
Addresses #381. Miles checkpoints used to restore only on the exact fork commit that saved them, so moving a config to a newer image stranded users' training states.
spindle_checkpoint_revision_mismatchinstead of failing. Format, layout, model, LoRA settings and topology still have to match.E2E
A Qwen3.5-4B training state saved on
miles-v0.1.1-fdd808c, restored with optimizer through the stock Tinker SDK, then one fixed step:fdd808c52a7a99, this PRPer-token logprobs are bit-identical.
Refused load on
miles-v0.2.0-e814245(W&B): client B loaded a copy of client A's checkpoint with an altered base-model fingerprint, which Miles refuses. B's request failed in 3.3 s and its slot was unchanged. A kept training on the same trainer, and B then loaded the real checkpoint and matched A's next step exactly. One trainer container served the whole run. On main, this refusal stops the trainer.v0.1.2 pairs, same procedure:
f2f8447→99e1ebeon 2×8 B300 (A, B): restored NLL 12.273228 on both, with all per-token logprobs and step loss identical.464efc9-glm53→99e1ebe-glm53on 8×B300 (A, B): restored NLL 10.546 vs 10.608 and step loss 12.082 vs 12.087. This recipe isn't deterministic: repeated reads on one client vary by about 0.1.🤖 Generated with Claude Code