-
Notifications
You must be signed in to change notification settings - Fork 538
Detailed IPOPT Log in ipopt_v2
#3577
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
base: main
Are you sure you want to change the base?
Conversation
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 couple minor comments. Yay for improved type hints!
results.extra_info.get("iteration_log")._visibility = ( | ||
ADVANCED_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.
I'm confused. What type of object does results.extra_info.get("iteration_log")
return? From below, I thought it would be a list.
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.
Correct - it's a list. (It can be a very long list, because it captures all of the iterations. See IDAES/idaes-pse#92 (comment))
EDIT: To be clear, the remainder of parsed_output_data
by this point is a dictionary with complementarity, constraint_violation, final_scaled_results, iteration_log, etc. iteration_log is the only thing that I am setting to ADVANCED_OPTION
because it can be a lot to print out when running *.display()
.
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'm just confused about how it has the _visibility
attribute...
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.
Oh, because it's an implicitly declared ConfigValue
.
Oh, is there a copy of the log parsing code in parmest that needs to be removed? |
I'm hesitant to remove anything from parmest because I don't know how it's being used outside of Pyomo (e.g., it might be "the thing" that people are using to parse IPOPT output in other places). I figure it's something we can either (a) leave because it does no harm or (b) remove in the future with a fair deprecation warning. |
Fixes #548, #728 , IDAES/idaes-pse#92
Summary/Motivation:
There is a utility wrapper in parmest that gathers helpful data from the IPOPT log that has never been promoted to a "real world citizen." This PR replaces the need for that in
ipopt_v2
by parsing the output and storing important data by default on theResults
object.NOTE: This PR contains #3576 so that one needs to be merged first.
Changes proposed in this PR:
Legal Acknowledgement
By contributing to this software project, I have read the contribution guide and agree to the following terms and conditions for my contribution: