diff --git a/python/orca/test/bigdl/orca/learn/spark/test_estimator_openvino.py b/python/orca/test/bigdl/orca/learn/spark/test_estimator_openvino.py index ffe1718cbd5..0ca24143906 100644 --- a/python/orca/test/bigdl/orca/learn/spark/test_estimator_openvino.py +++ b/python/orca/test/bigdl/orca/learn/spark/test_estimator_openvino.py @@ -16,6 +16,7 @@ import os import tempfile import subprocess +import tarfile from unittest import TestCase import numpy as np @@ -43,8 +44,9 @@ def test_openvino(self): model_url = data_url + "/analytics-zoo-data/openvino2020_resnet50.tar" model_path = maybe_download("openvino2020_resnet50.tar", local_path, model_url) - cmd = "tar -xvf " + model_path + " -C " + local_path - subprocess.Popen(cmd.split()) + tar = tarfile.open(model_path) + tar.extractall(path=local_path) + tar.close() model_path = os.path.join(local_path, "openvino2020_resnet50/resnet_v1_50.xml") est = Estimator.from_openvino(model_path=model_path)