-
Notifications
You must be signed in to change notification settings - Fork 79
refactor(sos): add Model.apply/undo_sos_reformulation methods #690
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
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
26d0d42
refactor(sos): add Model.apply/undo_sos_reformulation methods
FBumann 911850d
Merge remote-tracking branch 'origin/master' into refactor/sos-reform…
FBumann 68d75cd
refactor(solver): validation, sanitize kwargs, and result wiring on S…
FBumann e08733c
refactor(sos): tighten undo semantics and error hints
FabianHofmann 9c38ea6
fix(sos): auto-undo SOS reformulation when build/solve raises
FBumann f7b3a11
fix(sos): support reformulation through remote/oetc netcdf path
FBumann 201b872
test(sos): fix mypy errors on remote-bracket and resolve tests
FBumann 79b6a07
refactor(sos): move reformulation lifecycle into remote handlers
FabianHofmann 3cbb9cd
Merge branch 'master' into refactor/sos-reformulation-methods
FabianHofmann 67c939e
fix(types): tighten reformulate_sos to bool | Literal["auto"]
FabianHofmann 4497392
test(ssh): cover SOS bracket in RemoteHandler.solve_on_remote
FabianHofmann 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
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.
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.
I thought someone might need it to use sos reformulation with remote/oetc. Doesnt this go through netcdf?
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.
that is totally true. so would be nice to support it
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.
@FBumann should I quickly do that?
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.
Ill do it
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.
after thinking about it, I would actually like to have that as a follow up where we touch more on logic how to store sos attributes. so this should not be a blocker for now
Uh oh!
There was an error while loading. Please reload this page.
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.
For me it doesnt feel hacky. We treat oetc/remote like we do any solver: Mutate the Model, the solver gets only what he needs. This perfectky trasitions to #683, with OETC behaving like a regular solver.
IO Is now not needed, but can be added anyway (dropping data on IO is never the best option)
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.
@FabianHofmann If you disagree, we can discuss it. Im not using oetc...
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.
fine, let's me add a commit to streamline the code in solve now. many lines are they only for the purpose of reformulation awareness. I'll draft something and likely move the reformulation hanlding into the functions solve_on_* with a context manager
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.
I would maybe defer that after we close #683 ? Then we cleanly refactor? But we can also do it twice, i dont mind
Uh oh!
There was an error while loading. Please reload this page.
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.
#683 is way more invasive than the small refactor above, have it ready. just reviewed locally and pushing it here. improves the readability of solve significantly