idaes-pse
idaes-pse copied to clipboard
Update OMLT version for idaes-pse Installation.
This is an issue from dispatches. https://github.com/gmlc-dispatches/dispatches/issues/149
We use OMLT to represent neural networks in the Pyomo optimization environment. Now the IDAES requires OMLT v0.3.1 for installation. However, the OMLT team released OMLT v1.0 in February 2022. In dispatches projects, we build neural network surrogates using OMLT v1.0.
Dispatches projects have dependencies on IDAES. So in the new IDAES 2.0 release, will the team update the OMLT requirement to v1.0?
@carldlaird @dangunter Can we get help tagging the best people to give input on this?
@Xinhe-Chen @adowling2 Without knowing more about the current and future plans for OMLT, I'm not personally aware of any strong reason why the specific version 0.3.1 was chosen.
My suggestion would therefore to try opening a PR here with the only change being the version in the omlt
requirement in setup.py
, and see if the test suite shows any difference.
I started a draft PR according to @lbianchi-lbl 's suggestion. Thanks a lot.
https://github.com/IDAES/idaes-pse/pull/985
The tests failed. I think the problem is that OMLT v1.0 reorganizes the codes and 'FullSpaceContinuousFormulation' is not available anymore. The Keras surrogates API in IDAES is based on OMLT v0.3.1, so the tests failed due to importing package errors.
@Xinhe-Chen would you be able to try and change the imports in IDAES to track the OMLT v1 API as part of #985?
Being completely unfamiliar with that part of the codebase, I do not have a feeling of how much work it would be, and I definitely can't speak for the entire project on this topic. However, from a purely general dependency management point of view, I think we (i.e. on the IDAES side) would want to use the OMLT v1 API (rather than the current v0.3.1) going forward, so if changing the imports is all it takes, we could consider having these changes (together with a requirement on omlt>=1.0
) for the Nov release.
@lbianchi-lbl I can have a try. I need to carefully check the changes that the OMLT team made through the v1.0 release. Some functions are rewritten so I don't think it is as easy as just changing the names from importing.
Update: put this issue to the Feb IDAES release.
Ask OMLT collaborators if they can update the surrogate codes related to OMLT in IDAES.
Draft PR #1083 has been submitted to resolve this issue