Update PyROS Uncertainty Set Validation Methods#3558
Conversation
|
@shermanjasonaf @jsiirola I have addressed all comments. I would appreciate further feedback on my implementations for |
jsiirola
left a comment
There was a problem hiding this comment.
This looks good. @jas-yao, @shermanjasonaf: do you want to update the version & changelog as part of this PR before we merge it, or just add it to the next PR?
Co-authored-by: Bethany Nicholson <[email protected]>
Co-authored-by: Bethany Nicholson <[email protected]>
Co-authored-by: Bethany Nicholson <[email protected]>
Co-authored-by: Bethany Nicholson <[email protected]>
mrmundt
left a comment
There was a problem hiding this comment.
There are two doc issues (missing variables names), but this is otherwise lovely.
|
|
||
| Returns | ||
| ------- | ||
| : bool |
There was a problem hiding this comment.
The actual varname is missing here.
|
|
||
| Returns | ||
| ------- | ||
| : list of tuple |
There was a problem hiding this comment.
The actual varname is missing here.
There was a problem hiding this comment.
These are return values, so the actual var name is not necessary (or really all that relevant). I believe that this is syntactically correct numpydoc (the : just makes it explicit that we are providing the return type and are not specifying a (suggested) name.
|
@jas-yao This looks good. You may want to remove the custom implementation of |
@jsiirola Let's leave the version number and changelog updates for #3649. |
Fixes: #2724, #3508
Summary/Motivation:
This PR provides updates to PyROS uncertainty set validation methods and related tests.
Here, a
validatemethod replaces theis_validmethod (which solves 2N bounding problems to check for set boundedness) in all uncertainty sets, with each set having its own customvalidatemethod that efficiently checks set-specific attributes and raises informative exceptions if any issues are found.Changes proposed in this PR:
is_boundedandis_nonemptymethods in baseUncertaintySetclass_solve_feasibilitymethod in baseUncertaintySetclassis_validwithvalidatemethod that runsis_boundedandis_nonemptyin the baseUncertaintySetclassvalidatein subclass uncertainty sets to check set-specific attributesvalidatemethodis_bounded,is_nonempty,_solve_feasibility, andvalidatemethodsTODO
_compute_parameter_boundsvalidate_arrayto allvalidatemethodstest_validatetests into separate tests for each validation check_validatemethod forPolyhedralSetLegal Acknowledgement
By contributing to this software project, I have read the contribution guide and agree to the following terms and conditions for my contribution: