Add resumable execution to the screening framework (#33) - #74
Merged
Conversation
Resolves the one MVP gap left in the screening workflow (#33): resume/checkpoint. - screen(): results are now written after every molecule (incremental), so an interrupted screen leaves a durable partial `<out>.json`/`.csv`. - screen(resume=True): reuse the `status="ok"` records from a prior `<out>.json` (via `_load_completed`), skip those molecules, and (re)run the missing/failed ones. A missing or corrupt prior file just runs everything. - CLI: `thermo screen --resume`. Closes #33
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #74 +/- ##
==========================================
+ Coverage 96.68% 96.73% +0.05%
==========================================
Files 24 24
Lines 1538 1564 +26
==========================================
+ Hits 1487 1513 +26
Misses 51 51
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Address review of #33: write <out>.csv/.json via a temp file + os.replace so an interrupted write cannot leave a truncated (unresumable) file, and treat a valid but non-list prior JSON as nothing-to-resume rather than crashing.
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.
Resolves the one MVP requirement still missing from the screening workflow (#33): resume/checkpoint (input/output formats, result collection, and per-molecule error isolation were already done).
What changed
screen()now writes<out>.json/.csvafter every molecule, so an interrupted run leaves a durable partial result set (previously written only once at the end).screen(resume=True)— reuses thestatus="ok"records from a prior<out>.json(_load_completed), skips those molecules, and (re)runs the missing/previously-failed ones. A missing or corrupt prior file just runs everything.thermo screen --resume.Tests
mol_bre-run aftermol_asucceeded,mol_bfailed);[1, 2, 3]after each of 3 molecules);_load_completedtolerates missing/corrupt prior files;--resumeparsing.Closes #33. Full suite green (patch fully covered).