diff --git a/.github/workflows/test-mlperf-loadgen-onnx-huggingface-bert-fp32-squad.yml b/.github/workflows/test-mlperf-loadgen-onnx-huggingface-bert-fp32-squad.yml index ed73c7ad03..597121fb0d 100644 --- a/.github/workflows/test-mlperf-loadgen-onnx-huggingface-bert-fp32-squad.yml +++ b/.github/workflows/test-mlperf-loadgen-onnx-huggingface-bert-fp32-squad.yml @@ -5,7 +5,7 @@ name: MLPerf loadgen with HuggingFace bert onnx fp32 squad model on: pull_request: - branches: [ "main", "dev" ] + branches: [ "main", "dev", "mlperf-inference" ] paths: - '.github/workflows/test-mlperf-loadgen-onnx-huggingface-bert-fp32-squad.yml' - '**' @@ -18,7 +18,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [ "3.12" ] + python-version: [ "3.10", "3.12" ] steps: - uses: actions/checkout@v3 @@ -30,7 +30,6 @@ jobs: run: | python3 -m pip install cmind cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }} - cm run script --quiet --tags=get,sys-utils-cm - name: Test MLPerf loadgen with HuggingFace bert onnx fp32 squad model run: | - cmr "python app loadgen-generic _onnxruntime _custom _huggingface _model-stub.ctuning/mlperf-inference-bert-onnx-fp32-squad-v1.1" --adr.hf-downloader.model_filename=model.onnx --quiet + cm run script --tags=python,app,loadgen-generic,_onnxruntime,_custom,_huggingface,_model-stub.ctuning/mlperf-inference-bert-onnx-fp32-squad-v1.1 --quiet diff --git a/script/get-ml-model-huggingface-zoo/download_model.py b/script/get-ml-model-huggingface-zoo/download_model.py index 4e6e9c86e8..87f9b25aeb 100644 --- a/script/get-ml-model-huggingface-zoo/download_model.py +++ b/script/get-ml-model-huggingface-zoo/download_model.py @@ -28,8 +28,7 @@ model_filenames = model_filename.split(',') if ',' in model_filename else [model_filename] - # First must be model - base_model_filename = model_filenames[0] + base_model_filepath = None files = [] if full_subfolder!='': @@ -93,15 +92,17 @@ def list_hf_files(path): xrevision = None if revision == '' else revision xsubfolder = None if subfolder == '' else subfolder - hf_hub_download(repo_id=model_stub, + downloaded_path = hf_hub_download(repo_id=model_stub, subfolder=xsubfolder, filename=model_filename, - force_filename=model_filename, revision=xrevision, cache_dir=os.getcwd()) + print(downloaded_path) + if not base_model_filepath: + base_model_filepath = downloaded_path print ('') with open('tmp-run-env.out', 'w') as f: - f.write(f"CM_ML_MODEL_FILE_WITH_PATH={os.path.join(os.getcwd(),base_model_filename)}") + f.write(f"CM_ML_MODEL_FILE_WITH_PATH={base_model_filepath}")