Skip to content

Commit

Permalink
create test_data_set on the fly
Browse files Browse the repository at this point in the history
Signed-off-by: jcwchen <[email protected]>
  • Loading branch information
jcwchen committed Jun 21, 2023
1 parent 77f4a3c commit 1337fe8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linux_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10']
python-version: ['3.11']
architecture: ['x64']

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: windows-latest
strategy:
matrix:
python-version: ['3.10']
python-version: ['3.11']
architecture: ['x64']

steps:
Expand Down
9 changes: 6 additions & 3 deletions workflow_scripts/run_mlagility.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import shutil
import subprocess
import sys
import ort_test_dir_utils


def get_immediate_subdirectories_count(dir_name):
Expand Down Expand Up @@ -54,10 +55,12 @@ 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 + "_")
shutil.copy(osp.join(cache_converted_dir, model_hash_name, "onnx", model_hash_name + base_name), final_model_path)
if not args.create:
print(f"Successfully created {model_zoo_dir} by mlagility.")
mlagility_created_dir = 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)
print(f"Successfully created {model_zoo_dir} by mlagility and ORT.")
else:
shutil.copy(mlagility_created_dir, final_model_path)
subprocess.run(["git", "diff", "--exit-code", "--", final_model_path],
cwd=cwd_path, stdout=sys.stdout,
stderr=sys.stderr, check=True)
Expand Down

0 comments on commit 1337fe8

Please sign in to comment.