diff --git a/setup.cfg b/setup.cfg index 465a58432..40559523a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -35,7 +35,7 @@ packages = find: install_requires = typing_compat;python_version<'3.8' dataclasses;python_version<'3.7' - graph_scheduler<1.2.0,>=1.1.1 + graph_scheduler>=1.1.1 numpy matplotlib graphviz diff --git a/src/modeci_mdf/interfaces/actr/importer.py b/src/modeci_mdf/interfaces/actr/importer.py index 72db1527b..4c60fb095 100644 --- a/src/modeci_mdf/interfaces/actr/importer.py +++ b/src/modeci_mdf/interfaces/actr/importer.py @@ -228,7 +228,8 @@ def build_model() -> Model: fire_prod_node.id: cond_fire_prod, check_node.id: cond_check, }, - termination={"check_term_true": cond_term}, + # FIXME: Disable termination condition for now. This is causing errors in the scheduler. Seems unused in tests. + # termination={"environment_state_update": cond_term}, ) return mod diff --git a/src/modeci_mdf/interfaces/onnx/exporter.py b/src/modeci_mdf/interfaces/onnx/exporter.py index 8ff9893da..4e25ca8ea 100644 --- a/src/modeci_mdf/interfaces/onnx/exporter.py +++ b/src/modeci_mdf/interfaces/onnx/exporter.py @@ -49,9 +49,22 @@ def mdf_to_onnx(mdf_model): # Check to see if onnxruntime version is less than 1.15, if so ir_version should # be 8 for now. See: https://github.com/microsoft/onnxruntime/issues/15874 + # There is still now programmatic way to determine the max supported ir_version from onnxruntime + # Here is the issue: https://github.com/microsoft/onnxruntime/issues/14932 + # We will have to continue this dumb hack for the time being. make_model_kwargs = {} - if onnxruntime.__version__ < "1.15": - make_model_kwargs = {"ir_version": 8} + try: + from packaging.version import Version, InvalidVersion + + v = Version(onnxruntime.__version__) + + if v < Version("1.15"): + make_model_kwargs = {"ir_version": 8} + elif v < Version("1.18"): + make_model_kwargs = {"ir_version": 9} + + except (InvalidVersion, ModuleNotFoundError): + pass onnx_model = helper.make_model(onnx_graph, **make_model_kwargs)