leandron commented on a change in pull request #9074:
URL: https://github.com/apache/tvm/pull/9074#discussion_r714626768



##########
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:
       We thought about doing something more elaborate, like simulating the 
actual import failing, but in the end we settled in just trusting the import 
error will be there when _the input framework of choice_ is not there, and work 
with the behaviour we expect.
   
   Do you have an example on how this monkey would work, so that we can write a 
more comprehensive test? Otherise I'd keep it as is.




-- 
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]


Reply via email to