IDAES/examples

Keras failures for optimization notebook

Closed this issue · 4 comments

Error (occurring on import of the keras surrogate code):

~\miniconda3\envs\idaes_main_py310\lib\site-packages\idaes\core\surrogate\keras_surrogate.py in <module>
     28 if omlt_available:
     29     from omlt import OmltBlock, OffsetScaling
---> 30     from omlt.neuralnet import (
     31         FullSpaceContinuousFormulation,
     32         ReducedSpaceContinuousFormulation,

ImportError: cannot import name 'FullSpaceContinuousFormulation' from \
'omlt.neuralnet' (C:\Users\dang\miniconda3\envs\idaes_main_py310\lib\site-packages\omlt\neuralnet\__init__.py)

OMLT version

>>> omlt.__version__
'1.1'

I just realized that IDAES-PSE has fixed OMLT to 0.3.1; I will try this and see if it fixes the problem

Nope! 1.1 is correct..

Can you test against the current IDAES main branch? Those imports were resolved by IDAES/idaes-pse#1083

Seems to be fixed now, thanks