Conversation
When the Stop context is already done, getCheckpoint can return an error and an empty checkpoint, which Stop then wrote over the stored one. Skip that write so the last stored checkpoint stays in place.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5306 +/- ##
==========================================
- Coverage 37.52% 37.48% -0.04%
==========================================
Files 321 321
Lines 22323 22322 -1
==========================================
- Hits 8376 8367 -9
- Misses 12922 12932 +10
+ Partials 1025 1023 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
This branch has not been deployed
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.
Closes #5305
Stopnow only writes the early checkpoint whengetCheckpointsucceeds. If it fails, the error is logged and the checkpoint already on disk is left alone, instead of being replaced with an empty one. The rest ofStopis unchanged: the final checkpoint is still written after the sampler and workers have shut down.The new test stores a checkpoint at the synced head, calls
Stopwith a canceled context and checks the stored checkpoint afterwards, 20 times sincegetCheckpointonly fails when the select picksctx.Done(). On main it fails withSampleFrom: 0, NetworkHead: 0; with this changego test -race ./das/...passes.