Repository navigation
125: Stop check_* masking return values - #208
Merged
Merged
Conversation
Tests for the return codes of check_*_ready/check_complete, the argument mismatch in check_complete's call to check_validation_ready, and the CPU device fallback. Currently failing. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Assert check_checkpointing_ready passes for a configured solver, and drop mock LION modules left in sys.modules by other test files so this module imports the real ones regardless of test order. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Accumulate return codes across checks instead of overwriting them, return a code regardless of verbosity, pass autofill/verbose correctly from check_complete, check the do_load_checkpoint flag rather than the load_checkpoint method, and fall back to CPU when CUDA is unavailable. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Drop commentary that described past behaviour and shorten the rest. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Member
|
Great thanks! I think Claude overdoes a bit the tests and in this case are not necesary, can you remove them? |
Contributor
Author
|
Done, ready for re-review @AnderBiguri 😄 |
Member
|
Done! |
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.
Most of this code was written by AI, but I'm writing this description myself.
Fixes #125. Previously, each check in
LIONsolveroverwrote thereturn_code. Now, usemaxto collate the return codes (not a perfect method, so I've raised #209 to improve how the codes work, but it's alright for now).Secondly, fixes a few incorrect function signature usages.
Thirdly, fixes a problem whereby
verbose=Truecauses the return code to drop entirely.