-
Notifications
You must be signed in to change notification settings - Fork 246
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
Checks for variables with None value in NLP #1564
base: main
Are you sure you want to change the base?
Checks for variables with None value in NLP #1564
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1564 +/- ##
=======================================
Coverage 77.06% 77.06%
=======================================
Files 389 389
Lines 62680 62706 +26
Branches 10276 10280 +4
=======================================
+ Hits 48303 48324 +21
- Misses 11939 11944 +5
Partials 2438 2438 ☔ View full report in Codecov by Sentry. |
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.
A typo and a change in text otherwise this looks good to me
typo Co-authored-by: agarciadiego <[email protected]>
RuntimeError, | ||
match=self.err_msg(3), | ||
): | ||
diag_tbx.display_problematic_constraint_terms(model.con_y[1]) |
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.
@dallan-keylogic Just curious--and we could easily loop through constraints ourselves--but is there another method that display problematic constraint terms for all active constraints? Unrelated to this PR, but figured I'd ask before checking.
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.
Or alternatively, do we have a method that simply displays a list of constraints that have been identified as having problematic terms?
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.
@adam-a-a There are separate methods for finding all constraints with either mismatched terms or potential cancellations. This method is here to provide more detail on one specific constraint, as displaying all information for all constraints upfront would be overwhelming.
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.
LGTM! The only thing that seems to be missing is adding to documentation on the new DiagnosticToolbox / model_diagnostics methods/functions. Is this already being handled by automated documentation via doc strings? If that is all we think we need, that's fine, but if there is anything additional that we think should be more explicitly described in documentation, we can make an issue to remind us of that.
Just double-checked readthedocs and see that the automated documentation is sufficient! |
Fixes
Summary/Motivation:
This PR addresses #1522 by adding checks for uninitialized variables in the nlp object, as well as new functions in
model_statistics
and a new method for theDiagnosticsToolbox
,display_variables_with_none_value_in_activated_constraints
, to create a list of offending variables for your model.Legal Acknowledgement
By contributing to this software project, I agree to the following terms and conditions for my contribution: