Skip to content

Commit

Permalink
fix tar (#3137)
Browse files Browse the repository at this point in the history
  • Loading branch information
cyita authored and yangw1234 committed Sep 27, 2021
1 parent 36b3c53 commit 98f54fa
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import os
import tempfile
import subprocess
import tarfile
from unittest import TestCase

import numpy as np
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit 98f54fa

Please sign in to comment.