diff --git a/models/mlagility/maskrcnn_resnet50_fpn_v2/maskrcnn_resnet50_fpn_v2-18.onnx b/models/mlagility/maskrcnn_resnet50_fpn_v2/maskrcnn_resnet50_fpn_v2-18.onnx deleted file mode 100644 index 485fd68c5..000000000 --- a/models/mlagility/maskrcnn_resnet50_fpn_v2/maskrcnn_resnet50_fpn_v2-18.onnx +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7db0e1ec47735291d4b773c3d0f15870082ab5a8085d0916bc5dede46005797e -size 185546314 diff --git a/models/mlagility/maskrcnn_resnet50_fpn_v2/test_data_set_0/input_0.pb b/models/mlagility/maskrcnn_resnet50_fpn_v2/test_data_set_0/input_0.pb deleted file mode 100644 index cafd3a97c..000000000 --- a/models/mlagility/maskrcnn_resnet50_fpn_v2/test_data_set_0/input_0.pb +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9b7842d8299227e278713dcb9c5dd4e8b4958f21448f029d3a6a616eb3a70371 -size 602136 diff --git a/models/mlagility/maskrcnn_resnet50_fpn_v2/test_data_set_0/output_0.pb b/models/mlagility/maskrcnn_resnet50_fpn_v2/test_data_set_0/output_0.pb deleted file mode 100644 index 47279c08a..000000000 --- a/models/mlagility/maskrcnn_resnet50_fpn_v2/test_data_set_0/output_0.pb +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a2486a2aa2e40fdb582af9d444314dc12924d8adb59580d0823b34c7cb5eafe4 -size 739 diff --git a/models/mlagility/maskrcnn_resnet50_fpn_v2/test_data_set_0/output_1.pb b/models/mlagility/maskrcnn_resnet50_fpn_v2/test_data_set_0/output_1.pb deleted file mode 100644 index 7b77361b7..000000000 --- a/models/mlagility/maskrcnn_resnet50_fpn_v2/test_data_set_0/output_1.pb +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8e27109e1adab6b49bea9f661413698a641d04c4efb5eda6fb198c316d583c60 -size 385 diff --git a/models/mlagility/maskrcnn_resnet50_fpn_v2/test_data_set_0/output_2.pb b/models/mlagility/maskrcnn_resnet50_fpn_v2/test_data_set_0/output_2.pb deleted file mode 100644 index b8d9e2242..000000000 --- a/models/mlagility/maskrcnn_resnet50_fpn_v2/test_data_set_0/output_2.pb +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4aa65d1f062b840ddf2e31718224d84f1ea0f41e43bbbbb3ee3b9d41dc996c3b -size 193 diff --git a/models/mlagility/maskrcnn_resnet50_fpn_v2/test_data_set_0/output_3.pb b/models/mlagility/maskrcnn_resnet50_fpn_v2/test_data_set_0/output_3.pb deleted file mode 100644 index 9862fafaa..000000000 --- a/models/mlagility/maskrcnn_resnet50_fpn_v2/test_data_set_0/output_3.pb +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9acb7f80bd45b8539897bab36bfc11155fbe6a6a25fffada4b7132772a3e65b0 -size 9031703 diff --git a/workflow_scripts/mlagility_config.py b/workflow_scripts/mlagility_config.py index 2309441b3..f412fd48e 100644 --- a/workflow_scripts/mlagility_config.py +++ b/workflow_scripts/mlagility_config.py @@ -2,7 +2,7 @@ "torch_hub/alexnet.py", "torch_hub/resnet50.py", "torchvision/fasterrcnn_resnet50_fpn_v2.py", - "torchvision/maskrcnn_resnet50_fpn_v2.py", + "torchvision/maskrcnn_resnet50_fpn.py", "torchvision/ssd300_vgg16.py", "torch_hub/mobilenet_v2.py", "torch_hub/mobilenet_v3_large.py", diff --git a/workflow_scripts/run_mlagility.py b/workflow_scripts/run_mlagility.py index 1f377d013..ef5c481aa 100644 --- a/workflow_scripts/run_mlagility.py +++ b/workflow_scripts/run_mlagility.py @@ -1,7 +1,7 @@ import argparse from mlagility_config import models_info import os.path as osp -from os import listdir +from os import listdir, rename from pathlib import Path import shutil import subprocess @@ -46,7 +46,9 @@ def main(): model_zoo_dir = model_name try: print(f"----------------Checking {model_zoo_dir}----------------") - final_model_path = osp.join(mlagility_models_dir, model_zoo_dir, f"{model_zoo_dir}-{ZOO_OPSET_VERSION}.onnx") + final_model_dir = osp.join(mlagility_models_dir, model_zoo_dir) + final_model_name = f"{model_zoo_dir}-{ZOO_OPSET_VERSION}.onnx" + final_model_path = osp.join(final_model_dir, final_model_name) if osp.exists(final_model_path) and args.skip: print(f"Skip checking {model_zoo_dir} because {final_model_path} already exists.") continue @@ -55,12 +57,13 @@ def main(): cwd=cwd_path, stdout=sys.stdout, stderr=sys.stderr, check=True) model_hash_name = find_model_hash_name(".cache", model_name + "_" + directory_name + "_") - mlagility_created_dir = osp.join(cache_converted_dir, model_hash_name, "onnx", model_hash_name + base_name) + mlagility_created_onnx = osp.join(cache_converted_dir, model_hash_name, "onnx", model_hash_name + base_name) if args.create: - ort_test_dir_utils.create_test_dir(mlagility_created_dir, "./", final_model_path) + ort_test_dir_utils.create_test_dir(mlagility_created_onnx, "./", final_model_path) + rename(osp.join(final_model_dir, model_hash_name), final_model_path) print(f"Successfully created {model_zoo_dir} by mlagility and ORT.") else: - shutil.copy(mlagility_created_dir, final_model_path) + shutil.copy(mlagility_created_onnx, final_model_path) subprocess.run(["git", "diff", "--exit-code", "--", final_model_path], cwd=cwd_path, stdout=sys.stdout, stderr=sys.stderr, check=True)