You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2020/10/01 10:31:05 UTC

[GitHub] [incubator-tvm] leandron commented on a change in pull request #6578: [tvmc] Introduce 'run' subcommand (part 4/4)

leandron commented on a change in pull request #6578:
URL: https://github.com/apache/incubator-tvm/pull/6578#discussion_r498143609



##########
File path: tests/python/driver/tvmc/conftest.py
##########
@@ -110,10 +112,33 @@ def onnx_resnet50():
 
 @pytest.fixture(scope="session")
 def tflite_compiled_module_as_tarfile(tmpdir_factory):
+
+    # Not all CI environments will have TFLite installed
+    # so we need to safely skip this fixture that will
+    # crash the tests that rely on it.
+    # As this is a pytest.fixture, we cannot take advantage
+    # of pytest.importorskip. Using the block below instead.
+    try:
+        import tflite
+    except ImportError:
+        print("Cannot import tflite, which is required by tflite_compiled_module_as_tarfile.")
+        return ""
+
     target_dir = tmpdir_factory.mktemp("data")
     graph, lib, params, _ = get_sample_compiled_module(target_dir)

Review comment:
       Got it. As it will be deprecated in the next release, and I find it a bit risky to push a last minute change to the compiler (before the release), I'm gonna add the TODO for now, in the interest of risk and time.
   
   We should soon update this soon, in a new PR to adjust `compile` and `run`.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org