Skip to content

Commit

Permalink
Re-exclude keras_model.py again.
Browse files Browse the repository at this point in the history
Actually, I don't like depending on test execution order. If
we ever parallelize tests this will be bad. Lets try
using exec. I think this will ensure the keras_model.py that
is local to the script runs each and every time.
  • Loading branch information
davidt0x committed Mar 20, 2024
1 parent 281ca4e commit 9f29248
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/TensorFlow/Keras/IRIS/keras_to_MDF.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
from modelspec.utils import _val_info
from modeci_mdf.execution_engine import EvaluableGraph

exec(open("./keras_model.py").read())

# load the keras model
model = tf.keras.models.load_model("keras_model_on_iris.keras")

Expand Down
2 changes: 2 additions & 0 deletions examples/TensorFlow/Keras/MNIST/keras_to_MDF.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
from modelspec.utils import _val_info
from modeci_mdf.execution_engine import EvaluableGraph

exec(open("./keras_model.py").read())

# load the keras model
model = tf.keras.models.load_model("kr_N_model.keras")

Expand Down
1 change: 1 addition & 0 deletions tests/test_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
".reconstructed.py",
"generate_json_and_scripts.py",
"pytorch_ddm.py",
"keras_model.py",
]

# Filter any excluded example scripts
Expand Down

0 comments on commit 9f29248

Please sign in to comment.