Repository navigation
Conversation
|
@blnicho @adowling2 @slilonfe5 @smondal13 The following choices need to be made for a robust implementation:
Will continue working on this tomorrow, but wanted to share starting progress. Thank you and please let me know if you have any strong opinions on these design choices. |
…r_options are both given
|
Thank you @smondal13 for reminding me this is done in DoE for reference. From previous message:
@adowling2 Please let me know if you disagree with any of these decisions. |
|
@sscini I agree with these design decisions. One wringle. For debugging, it could be desirable to set a solver option, such as iter=0, for one of the steps. I am okay if we defer that. But this has come up in the past when I have wanted to debug one of the solvers in Pyomo.DoE or ParmEst. |
| """ | ||
| if isinstance(solver, str): | ||
| solver_name = solver | ||
| solver = SolverFactory(solver_name) |
There was a problem hiding this comment.
Do you know the type or error raised when the solver name is unknown? If yes, it’s safer to put this in a try-except block.
There was a problem hiding this comment.
An error is not raised until you try to solve it. It instead creates an UnknownSolver, which is why I check for that after this step.
| raise RuntimeError("k_aug no longer supported.") | ||
| if solver == "ef_ipopt": | ||
| sol = SolverFactory('ipopt') | ||
| sol = self.solver |
There was a problem hiding this comment.
self.solver is constructed from whatever argument the user supplies in the Estimator class. The solver from “ef_ipopt” may not be the same as that from self.solver. Unless we want sol to be whatever self.solver is
There was a problem hiding this comment.
I missed this part thanks. In the current implementation (on main) using ef_ipopt just pointed to the default, so I was keeping the same option as the default in case people explicitly put it for backwards compatibility. Will rethink a smarter way to do this. In reality it would get the value from theta_est like with cov_est and _cov_at_theta
Fixes # .
Summary/Motivation:
Add ability to support solver objects in ParmEst instead of a solver string for opt SolverFactory.
Changes proposed in this PR:
AI-Use Disclosure
or
AI tools contributed to the development of this PR
Review process (select ONE):
Notes for reviewers (optional):
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: