Closed jsiirola closed 1 year ago
I see, even if you have tensorflow installed, it will hit the onnx code when you try to use the keras reader.
I think I'm in favor of either/both of the first two suggestions. Maybe we shouldn't be importing anything in omlt/io/__init__.py
and also attempt what Pyomo does.
I remember talking with @carldlaird about this. We'll come up with something to clean this up.
@jsiirola this should now be fixed in main with PR #97. We are prepping to cut a new OMLT release soon.
Thanks @jalving. The PR has been incorporated into OMLT 1.1.
I believe that there is a missing required dependency in the OMLT 1.0 release:
onnx
is listed as a "testing" dependency, but is required in order to import anything fromomlt.io
.Steps to reproduce:
Possible solutions:
omlt/io/__init__.py
omlt/io/onnx.py
(e.g., something likepyomo.common.dependencies.attempt_import()
)onnx
as a required dependency