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: | 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 }} 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' - '**' diff --git a/script/calibrate-model-for.qaic/customize.py b/script/calibrate-model-for.qaic/customize.py index 42f1c64ca..bae22c60a 100644 --- a/script/calibrate-model-for.qaic/customize.py +++ b/script/calibrate-model-for.qaic/customize.py @@ -125,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: @@ -141,8 +141,7 @@ def postprocess(i): docs = yaml.load_all(stream, yaml.FullLoader) for doc in docs: - -if isinstance(doc, if ) + if isinstance(doc, list): node_names = [k['NodeOutputName'] for k in doc] oindex = None @@ -206,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} - -