areusch commented on a change in pull request #9074:
URL: https://github.com/apache/tvm/pull/9074#discussion_r716938332
##########
File path: tests/python/driver/tvmc/test_frontends.py
##########
@@ -211,3 +212,43 @@ def
test_load_model___wrong_language__to_pytorch(tflite_mobilenet_v1_1_quant):
model_format="pytorch",
shape_dict={"input": [1, 3, 224, 224]},
)
+
+
[email protected]("tvm.driver.tvmc.frontends.import_keras")
+def test_import_keras_friendly_message(import_keras_mock, keras_resnet50):
+ import_keras_mock.side_effect = TVMCException("keras is not installed")
Review comment:
it's probably okay to do this right around the call site, but it could
get tricky if exception handlers also late-import stuff e.g. pytest's is fairly
complex and i don't know what it does entirely.
##########
File path: tests/python/driver/tvmc/test_frontends.py
##########
@@ -211,3 +212,43 @@ def
test_load_model___wrong_language__to_pytorch(tflite_mobilenet_v1_1_quant):
model_format="pytorch",
shape_dict={"input": [1, 3, 224, 224]},
)
+
+
[email protected]("tvm.driver.tvmc.frontends.import_keras")
+def test_import_keras_friendly_message(import_keras_mock, keras_resnet50):
Review comment:
agreed--unless there's some strange impl detail here? i'd prefer if we
could not skip these based on whether those packages are present.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]