-
Notifications
You must be signed in to change notification settings - Fork 63
feat: add on_success clean strategy to preserve workdir on failure #627
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
njzjz
merged 12 commits into
deepmodeling:master
from
SchrodingersCattt:feat/clean-on-success
Aug 29, 2026
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
f7aa93a
feat: add 'on_success' clean strategy to preserve workdir on failure
SchrodingersCattt 0842e7a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 1dee3ea
fix: on_success must not clean when ratio_unfinished kills jobs
SchrodingersCattt 864e64e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 03692c1
fix: add Union type hint for clean param, raise ValueError on invalid…
SchrodingersCattt 940fd0b
Merge branch 'feat/clean-on-success' of https://github.com/Schrodinge…
SchrodingersCattt 6dd0428
Merge branch 'master' into feat/clean-on-success
SchrodingersCattt d09f1a3
fix: fail-fast validation of clean strategy before submission
SchrodingersCattt 8229974
fix: add type hint to clean param, fix async truthiness check
SchrodingersCattt c14697c
chore: merge current master into clean strategy
njzjz-bot 32d75f0
fix: preserve results after download failure
njzjz-bot 44bb3b1
fix(test): isolate retry clock from logging
njzjz-bot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P2] Reject invalid strategies before starting the submission
The first validation currently happens only at the cleanup decision near the end of
run_submission. Withclean="on_sucess", I reproduced bothupload_jobs()andtry_download_result()being called before theValueError; on a real HPC workload that can mean hours of work before a typo is rejected, followed by an exception that makes an otherwise completed run look failed. Validate before recovery/upload/submission and add a test asserting invalid input causes no upload. A minimal fail-fast check here is:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed on the current branch and reverified with 32d75f0.
run_submission()validates the clean strategy immediately after the resources assertion, before job generation, recovery, upload, or scheduler submission; the regression asserts that invalid input never callsupload_jobs().Validation passed together with the remaining review fixes: 13 focused tests, the full 255-test suite (44 skipped), Ruff, canonical ty, CLI/example smoke tests, and the Sphinx HTML build (with existing warnings).
Coding agent: Codex
Codex version: codex-cli 0.151.0
Model: gpt-5.6-sol
Reasoning effort: xhigh