[nGraph][Py][Tests] Remove backup of old models (#1349)
This commit is contained in:
parent
17287f20a0
commit
28227dcd9f
@ -72,18 +72,6 @@ class ModelZooTestRunner(onnx.backend.test.BackendTest):
|
||||
etag_file_path = os.path.join(model_dir, "source_tar_etag")
|
||||
open(etag_file_path, "w").write(etag_value)
|
||||
|
||||
@staticmethod
|
||||
def _backup_old_version(model_dir): # type: (str) -> None
|
||||
if os.path.exists(model_dir):
|
||||
backup_index = 0
|
||||
while True:
|
||||
dest = "{}.old.{}".format(model_dir, backup_index)
|
||||
if os.path.exists(dest):
|
||||
backup_index += 1
|
||||
continue
|
||||
shutil.move(model_dir, dest)
|
||||
break
|
||||
|
||||
@classmethod
|
||||
@retry
|
||||
def prepare_model_data(cls, model_test): # type: (OnnxTestCase) -> Text
|
||||
@ -99,9 +87,6 @@ class ModelZooTestRunner(onnx.backend.test.BackendTest):
|
||||
):
|
||||
return model_dir
|
||||
|
||||
# If model does exist, but is not current, backup directory
|
||||
ModelZooTestRunner._backup_old_version(model_dir)
|
||||
|
||||
# Download and extract model and data
|
||||
download_file = tempfile.NamedTemporaryFile(delete=False)
|
||||
temp_clean_dir = tempfile.mkdtemp()
|
||||
|
Loading…
Reference in New Issue
Block a user