Draft
Conversation
- Remove disable_card feature from CheckpointDecorator - Fix _extract_task_object bug where Task object was passed back into Task() constructor when attempt was specified, causing AttributeError - Update inspect_checkpoints to iterate over all attempts (0..current_attempt) using Task.current_attempt to get the range Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
WIP: need to clean this up quite a bit, but here's a tl;dr
Implicit checkpointing: automatically save and restore flow attributes across retries
This branch adds implicit checkpointing to the
@checkpointdecorator — instead of requiring users to manage files manually,current.checkpoint.save()now automatically serializes the flow step's Python attributes to durable storage, andcurrent.checkpoint.load()restores them in place. The result is that crash-safe training loops require almost no boilerplate.What changed
save()andload()no longer take a path — they operate directly on the flow's attributes.save()snapshots whichever fields are in scope;load()writes them back ontoself. Aninclude=orexclude=list on the decorator controls which fields are included.Added
current.checkpoint.inspect()— returns the saved field manifest (name → type) without downloading the checkpoint, useful for introspecting what was saved.current.checkpoint.list()now returnsCheckpointArtifactobjects instead of raw dicts, giving callers typed access to checkpoint metadata.Fixed a bug in
list(attempt=N)where passing an explicit attempt number caused anAttributeError(Taskobject being passed back into theTask()constructor).Card: checkpoints now sorted by creation time in the live-refresh table.
Card: lineage section fixed — previously showed an empty table when the loaded checkpoint had no ancestors; now shows
_no lineage found_instead. Also added an "Attempt" column and fixed the ordering so index 0 is always the oldest ancestor.Card: lineage chain now includes the directly loaded checkpoint — previously the loaded checkpoint itself was omitted from the lineage table, making the second attempt always appear to have no lineage.
New example flow (
flows/example_pytorch_training.py) demonstrating the full pattern end-to-end with a simulated PyTorch training loop that deliberately fails mid-epoch and resumes cleanly on retry.