You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/10/30 21:56:28 UTC

[GitHub] ankkhedia commented on a change in pull request #12878: ONNX export: Cleanup

ankkhedia commented on a change in pull request #12878: ONNX export: Cleanup
URL: https://github.com/apache/incubator-mxnet/pull/12878#discussion_r229500860
 
 

 ##########
 File path: python/mxnet/contrib/onnx/mx2onnx/_op_translations.py
 ##########
 @@ -60,21 +60,16 @@
 import logging
 import numpy as np
 from .export_onnx import MXNetGraph as mx_op
-
-def import_onnx_modules():
-    """ To make sure ONNX is runtime dependency, it is imported used only when needed"""
-    try:
-        import onnx
-    except ImportError:
-        raise ImportError("Onnx and protobuf need to be installed. "
-                          + "Instructions to install - https://github.com/onnx/onnx")
-    return onnx
+try:
+    import onnx
+except ImportError:
+    onnx = None
 
 Review comment:
   Any reason for not raising exception here?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services