From 9a685e39546cb0bc32b244e3972a348e0b8b991e Mon Sep 17 00:00:00 2001 From: ANANDHU S <71482562+anandhu-eng@users.noreply.github.com> Date: Thu, 4 Sep 2025 23:32:49 +0530 Subject: [PATCH 1/5] Turn off test-mlperf-inference-tvm-resnet50.yml --- .github/workflows/test-mlperf-inference-tvm-resnet50.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-mlperf-inference-tvm-resnet50.yml b/.github/workflows/test-mlperf-inference-tvm-resnet50.yml index fafd3026d..d7b40d89b 100644 --- a/.github/workflows/test-mlperf-inference-tvm-resnet50.yml +++ b/.github/workflows/test-mlperf-inference-tvm-resnet50.yml @@ -2,7 +2,7 @@ name: MLPerf Inference TVM ResNet50 on: pull_request_target: - branches: [ "main", "dev" ] + branches: [ "main-off", "dev-off" ] paths: - '.github/workflows/test-mlperf-inference-tvm-resnet50.yml' - '**' From a051ce7576d917c4d0c3cc3654664c4815b0e938 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Thu, 4 Sep 2025 23:51:02 +0530 Subject: [PATCH 2/5] Fix syntax error --- script/calibrate-model-for.qaic/customize.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/script/calibrate-model-for.qaic/customize.py b/script/calibrate-model-for.qaic/customize.py index 42f1c64ca..ea47d6ac1 100644 --- a/script/calibrate-model-for.qaic/customize.py +++ b/script/calibrate-model-for.qaic/customize.py @@ -79,8 +79,7 @@ def construct_calibration_cmd(env): cmd = env['MLC_QAIC_EXEC_PATH'] + " " if is_true(env.get('MLC_CREATE_INPUT_BATCH', '')): cmd += " -input-list-file=batched_input_files -batchsize=" + batchsize + " " - cmd += compiler_params + " -dump-profile=profile.yaml -model=" + \ - env['MLC_ML_MODEL_FILE_WITH_PATH'] + cmd += compiler_params + " -dump-profile=profile.yaml -model=" + env['MLC_ML_MODEL_FILE_WITH_PATH'] return {'return': 0, 'cmd': cmd} @@ -142,7 +141,7 @@ def postprocess(i): for doc in docs: -if isinstance(doc, if ) + if isinstance(doc, list): node_names = [k['NodeOutputName'] for k in doc] oindex = None From e010dfa730e4cbe856788e106fa30641372d7909 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Fri, 5 Sep 2025 00:07:27 +0530 Subject: [PATCH 3/5] Fixes for codeql scan --- .../workflows/run-tests-on-modified-meta.yml | 8 +++++-- .../workflows/test-mlc-script-features.yml | 24 +++++++++++++++---- .github/workflows/test-mlperf-automotive.yml | 6 ++++- ...bert-deepsparse-tf-onnxruntime-pytorch.yml | 6 ++++- 4 files changed, 36 insertions(+), 8 deletions(-) diff --git a/.github/workflows/run-tests-on-modified-meta.yml b/.github/workflows/run-tests-on-modified-meta.yml index e2dd3b8f2..966b83ae8 100644 --- a/.github/workflows/run-tests-on-modified-meta.yml +++ b/.github/workflows/run-tests-on-modified-meta.yml @@ -52,9 +52,13 @@ jobs: steps: - name: Process meta.yaml file + shell: bash + env: + REPO: ${{ github.event.pull_request.head.repo.html_url }} + BRANCH: ${{ github.event.pull_request.head.ref }} run: | echo "Processing ${{ matrix.file_info.file }} with run number ${{ matrix.file_info.num_run }}" pip install mlcflow - mlc pull repo ${{ github.event.pull_request.head.repo.html_url }} --branch=${{ github.event.pull_request.head.ref }} - mlc test script ${{ matrix.file_info.uid}} --test_input_index=${{ matrix.file_info.num_run }} --docker_mlc_repo=${{ github.event.pull_request.head.repo.html_url }} --docker_mlc_repo_branch=${{ github.event.pull_request.head.ref }} --quiet + mlc pull repo "$REPO" --branch="$BRANCH" + mlc test script ${{ matrix.file_info.uid}} --test_input_index=${{ matrix.file_info.num_run }} --docker_mlc_repo="$REPO" --docker_mlc_repo_branch="$BRANCH" --quiet diff --git a/.github/workflows/test-mlc-script-features.yml b/.github/workflows/test-mlc-script-features.yml index cbc532bb2..37246a284 100644 --- a/.github/workflows/test-mlc-script-features.yml +++ b/.github/workflows/test-mlc-script-features.yml @@ -29,9 +29,13 @@ jobs: run: | git config --system core.longpaths true - name: Pull MLOps repository + shell: bash + env: + REPO: ${{ github.event.pull_request.head.repo.html_url }} + BRANCH: ${{ github.event.pull_request.head.ref }} run: | pip install mlcflow - mlc pull repo ${{ github.event.pull_request.head.repo.html_url }} --branch=${{ github.event.pull_request.head.ref }} + mlc pull repo "$REPO" --branch="$BRANCH" - name: Test Python venv run: | @@ -79,9 +83,13 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Pull MLOps repository + shell: bash + env: + REPO: ${{ github.event.pull_request.head.repo.html_url }} + BRANCH: ${{ github.event.pull_request.head.ref }} run: | pip install mlcflow - mlc pull repo ${{ github.event.pull_request.head.repo.html_url }} --branch=${{ github.event.pull_request.head.ref }} + mlc pull repo "$REPO" --branch="$BRANCH" - name: Run docker container from dockerhub on linux run: | @@ -110,9 +118,13 @@ jobs: run: | git config --system core.longpaths true - name: Pull MLOps repository + shell: bash + env: + REPO: ${{ github.event.pull_request.head.repo.html_url }} + BRANCH: ${{ github.event.pull_request.head.ref }} run: | pip install mlcflow - mlc pull repo ${{ github.event.pull_request.head.repo.html_url }} --branch=${{ github.event.pull_request.head.ref }} + mlc pull repo "$REPO" --branch="$BRANCH" - name: Test mlc experiment script run: | @@ -133,9 +145,13 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Pull MLOps repository + shell: bash + env: + REPO: ${{ github.event.pull_request.head.repo.html_url }} + BRANCH: ${{ github.event.pull_request.head.ref }} run: | pip install mlcflow - mlc pull repo ${{ github.event.pull_request.head.repo.html_url }} --branch=${{ github.event.pull_request.head.ref }} + mlc pull repo "$REPO" --branch="$BRANCH" - name: Run MLPerf Inference Retinanet with native and virtual Python run: | diff --git a/.github/workflows/test-mlperf-automotive.yml b/.github/workflows/test-mlperf-automotive.yml index 54c50a95e..62f3b72ab 100644 --- a/.github/workflows/test-mlperf-automotive.yml +++ b/.github/workflows/test-mlperf-automotive.yml @@ -26,7 +26,11 @@ jobs: echo "RCLONE_CONFIG_MLC_COGNATA_SERVICE_ACCOUNT_CREDENTIALS=${{ steps.op-load-secrets.outputs.GDRIVE_SERVICE_ACCOUNT_KEY }}" >> $GITHUB_ENV echo "RCLONE_CONFIG_MLC_NUSCENES_SERVICE_ACCOUNT_CREDENTIALS=${{ steps.op-load-secrets.outputs.GDRIVE_SERVICE_ACCOUNT_KEY }}" >> $GITHUB_ENV - name: Run MLPerf + shell: bash + env: + REPO: ${{ github.event.pull_request.head.repo.html_url }} + BRANCH: ${{ github.event.pull_request.head.ref }} run: | pip install mlcflow - mlc pull repo ${{ github.event.pull_request.head.repo.html_url }} --branch=${{ github.event.pull_request.head.ref }} + mlc pull repo "$REPO" --branch="$BRANCH" mlc test script app,mlperf,automotive diff --git a/.github/workflows/test-mlperf-inference-bert-deepsparse-tf-onnxruntime-pytorch.yml b/.github/workflows/test-mlperf-inference-bert-deepsparse-tf-onnxruntime-pytorch.yml index e5925e99a..302607862 100644 --- a/.github/workflows/test-mlperf-inference-bert-deepsparse-tf-onnxruntime-pytorch.yml +++ b/.github/workflows/test-mlperf-inference-bert-deepsparse-tf-onnxruntime-pytorch.yml @@ -38,8 +38,12 @@ jobs: pip install mlcflow pip install tabulate - name: Pull MLOps repository + shell: bash + env: + REPO: ${{ github.event.pull_request.head.repo.html_url }} + BRANCH: ${{ github.event.pull_request.head.ref }} run: | - mlc pull repo ${{ github.event.pull_request.head.repo.html_url }} --branch=${{ github.event.pull_request.head.ref }} + mlc pull repo "$REPO" --branch="$BRANCH" - name: Test MLPerf Inference Bert ${{ matrix.backend }} on ${{ matrix.os }} if: matrix.os == 'windows-latest' run: | From 76f17ce6c99da137a3a49795d6ba5ae590eae345 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 4 Sep 2025 18:37:42 +0000 Subject: [PATCH 4/5] [Automated Commit] Format Codebase [skip ci] --- script/calibrate-model-for.qaic/customize.py | 22 ++++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/script/calibrate-model-for.qaic/customize.py b/script/calibrate-model-for.qaic/customize.py index ea47d6ac1..bae22c60a 100644 --- a/script/calibrate-model-for.qaic/customize.py +++ b/script/calibrate-model-for.qaic/customize.py @@ -79,7 +79,8 @@ def construct_calibration_cmd(env): cmd = env['MLC_QAIC_EXEC_PATH'] + " " if is_true(env.get('MLC_CREATE_INPUT_BATCH', '')): cmd += " -input-list-file=batched_input_files -batchsize=" + batchsize + " " - cmd += compiler_params + " -dump-profile=profile.yaml -model=" + env['MLC_ML_MODEL_FILE_WITH_PATH'] + cmd += compiler_params + " -dump-profile=profile.yaml -model=" + \ + env['MLC_ML_MODEL_FILE_WITH_PATH'] return {'return': 0, 'cmd': cmd} @@ -124,11 +125,11 @@ def postprocess(i): output_layer_names_conf[1] = [ "TopK_570/:0", - "TopK_572/:0", - "TopK_574/:0", - "TopK_576/:0", - "TopK_578/:0" - ] + "TopK_572/:0", + "TopK_574/:0", + "TopK_576/:0", + "TopK_578/:0" + ] if env.get('MLC_QAIC_MODEL_NAME', '') == "retinanet": with open(profile_file_path, "r") as stream: @@ -140,7 +141,6 @@ def postprocess(i): docs = yaml.load_all(stream, yaml.FullLoader) for doc in docs: - if isinstance(doc, list): node_names = [k['NodeOutputName'] for k in doc] oindex = None @@ -205,13 +205,13 @@ def postprocess(i): conf_scale, conf_offset = get_scale_offset( output_min_val_conf, output_max_val_conf) env['MLC_QAIC_MODEL_RETINANET_LOC_SCALE'] = loc_scale - env['MLC_QAIC_MODEL_RETINANET_LOC_OFFSET'] = loc_offset - 128 # to uint8 is done in NMS code + env['MLC_QAIC_MODEL_RETINANET_LOC_OFFSET'] = loc_offset - \ + 128 # to uint8 is done in NMS code env['MLC_QAIC_MODEL_RETINANET_CONF_SCALE'] = conf_scale - env['MLC_QAIC_MODEL_RETINANET_CONF_OFFSET'] = conf_offset - 128 # to uint8 is done in NMS code + env['MLC_QAIC_MODEL_RETINANET_CONF_OFFSET'] = conf_offset - \ + 128 # to uint8 is done in NMS code except yaml.YAMLError as exc: return {'return': 1, 'error': exc} return {'return': 0} - - From 20e4c93a1ea21d36738918eebd64d1d2d16a1166 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Fri, 5 Sep 2025 00:08:46 +0530 Subject: [PATCH 5/5] Fixes for codeql scan --- .github/workflows/test-mlperf-inference-resnet50.yml | 1 + .github/workflows/test-mlperf-inference-retinanet.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/test-mlperf-inference-resnet50.yml b/.github/workflows/test-mlperf-inference-resnet50.yml index 7d4b574a1..81a32156f 100644 --- a/.github/workflows/test-mlperf-inference-resnet50.yml +++ b/.github/workflows/test-mlperf-inference-resnet50.yml @@ -47,6 +47,7 @@ jobs: pip install tabulate - name: Pull MLOps repo + shell: bash env: REPO: ${{ github.event.pull_request.head.repo.html_url }} BRANCH: ${{ github.event.pull_request.head.ref }} diff --git a/.github/workflows/test-mlperf-inference-retinanet.yml b/.github/workflows/test-mlperf-inference-retinanet.yml index 7ddd630c6..b5a116f13 100644 --- a/.github/workflows/test-mlperf-inference-retinanet.yml +++ b/.github/workflows/test-mlperf-inference-retinanet.yml @@ -45,6 +45,7 @@ jobs: pip install mlcflow pip install tabulate - name: Pull MLOps repo + shell: bash env: REPO: ${{ github.event.pull_request.head.repo.html_url }} BRANCH: ${{ github.event.pull_request.head.ref }}