[WIP] Checkpointing, part 1 - #1167
Draft
dwhswenson wants to merge 17 commits into
Draft
dwhswenson wants to merge 17 commits into
dwhswenson wants to merge 17 commits into
Conversation
…g into checkpointing-v2
…g into checkpointing-v2
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.
I've made a couple attempts at checkpointing for OPS. It seems that it requires an API break, because OPS will need to pass a
checkpointvariable into movers and then down into engines. This would break any external movers that don't support that variable, so this PR is pointed at thedev-2.0branch.This is a top-down implementation: it includes work for checkpointing movers, but not within engines. Of course, the whole point is to also checkpoint within engines, but that will come in a second PR that builds on this one. I don't plan to merge this PR until the second also exists as proof of principle.
General usage:
checkpointobject. They can get the checkpointed data usingcheckpoint.load_checkpoint(), which returns a tuple ofdataandfiles. They can extract data from thedatadict and moves files to the right location based on thefilesdict.with checkpoint.next_context()context manager.As of posting, this still needs more documentation on usage, but the above is a quick overview.