|
1 | 1 | name: MLC script automation features test |
2 | 2 |
|
3 | 3 | on: |
4 | | - pull_request_target: |
| 4 | + pull_request: |
5 | 5 | branches: [ "main", "dev" ] |
6 | 6 | paths: |
7 | 7 | - '.github/workflows/test-mlc-script-features.yml' |
@@ -130,81 +130,3 @@ jobs: |
130 | 130 | run: | |
131 | 131 | mlc experiment script --tags=detect,os --quiet --exp.repeat,=1,2,3 |
132 | 132 | mlc experiment script --tags=detect,cpu --quiet --exp.explore=2:10:2 |
133 | | -
|
134 | | - test_mlperf_retinanet_cpp_venv: |
135 | | - runs-on: ubuntu-latest |
136 | | - strategy: |
137 | | - fail-fast: false |
138 | | - matrix: |
139 | | - python-version: ["3.12", "3.8"] |
140 | | - |
141 | | - steps: |
142 | | - - uses: actions/checkout@v4 |
143 | | - - name: Set up Python ${{ matrix.python-version }} |
144 | | - uses: actions/setup-python@v3 |
145 | | - with: |
146 | | - python-version: ${{ matrix.python-version }} |
147 | | - - name: Pull MLOps repository |
148 | | - shell: bash |
149 | | - env: |
150 | | - REPO: ${{ github.event.pull_request.head.repo.html_url }} |
151 | | - BRANCH: ${{ github.event.pull_request.head.ref }} |
152 | | - run: | |
153 | | - pip install mlcflow |
154 | | - mlc pull repo "$REPO" --branch="$BRANCH" |
155 | | - |
156 | | - - name: Run MLPerf Inference Retinanet with native and virtual Python |
157 | | - run: | |
158 | | - mlcr app,mlperf,inference,generic,_cpp,_retinanet,_onnxruntime,_cpu --adr.python.version_min=3.8 --adr.compiler.tags=gcc --adr.openimages-preprocessed.tags=_50 --scenario=Offline --mode=accuracy --test_query_count=10 --rerun --quiet |
159 | | -
|
160 | | - mlcr app,mlperf,inference,generic,_cpp,_retinanet,_onnxruntime,_cpu --adr.python.version_min=3.8 --adr.compiler.tags=gcc --adr.openimages-preprocessed.tags=_50 --scenario=Offline --mode=performance --test_query_count=10 --rerun --quiet |
161 | | -
|
162 | | - mlcr install,python-venv --version=3.10.8 --name=mlperf --quiet |
163 | | -
|
164 | | - export MLC_SCRIPT_EXTRA_CMD="--adr.python.name=mlperf" |
165 | | -
|
166 | | - mlcr run,mlperf,inference --adr.python.version_min=3.8 --adr.compiler.tags=gcc --adr.openimages-preprocessed.tags=_50 --submitter=MLCommons --implementation=cpp --hw_name=default --model=retinanet --backend=onnxruntime --device=cpu --scenario=Offline --quiet |
167 | | -
|
168 | | - # Step for Linux/MacOS |
169 | | - - name: Randomly Execute Step (Linux/MacOS) |
170 | | - if: runner.os != 'Windows' |
171 | | - run: | |
172 | | - RANDOM_NUMBER=$((RANDOM % 10)) |
173 | | - echo "Random number is $RANDOM_NUMBER" |
174 | | - if [ "$RANDOM_NUMBER" -eq 0 ]; then |
175 | | - echo "run_step=true" >> $GITHUB_ENV |
176 | | - else |
177 | | - echo "run_step=false" >> $GITHUB_ENV |
178 | | - fi |
179 | | -
|
180 | | - # Step for Windows |
181 | | - - name: Randomly Execute Step (Windows) |
182 | | - if: runner.os == 'Windows' |
183 | | - run: | |
184 | | - $RANDOM_NUMBER = Get-Random -Maximum 10 |
185 | | - Write-Host "Random number is $RANDOM_NUMBER" |
186 | | - if ($RANDOM_NUMBER -eq 0) { |
187 | | - Write-Host "run_step=true" | Out-File -FilePath $Env:GITHUB_ENV -Append |
188 | | - } else { |
189 | | - Write-Host "run_step=false" | Out-File -FilePath $Env:GITHUB_ENV -Append |
190 | | - } |
191 | | -
|
192 | | - - name: Load secrets |
193 | | - if: github.repository_owner == 'mlcommons' && env.run_step == 'true' |
194 | | - id: op-load-secrets |
195 | | - uses: 1password/load-secrets-action@v3 |
196 | | - env: |
197 | | - OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} |
198 | | - PAT: op://7basd2jirojjckncf6qnq3azai/bzbaco3uxoqs2rcyu42rvuccga/credential |
199 | | - - name: Push Results |
200 | | - env: |
201 | | - GITHUB_TOKEN: ${{ steps.op-load-secrets.outputs.PAT }} |
202 | | - if: github.repository_owner == 'mlcommons' && env.run_step == 'true' |
203 | | - run: | |
204 | | - git config --global user.name "mlcommons-bot" |
205 | | - git config --global user.email "mlcommons-bot@users.noreply.github.com" |
206 | | - git config --global credential.https://github.com.helper "" |
207 | | - git config --global credential.https://github.com.helper "!gh auth git-credential" |
208 | | - git config --global credential.https://gist.github.com.helper "" |
209 | | - git config --global credential.https://gist.github.com.helper "!gh auth git-credential" |
210 | | - mlcr push,github,mlperf,inference,submission --repo_url=https://github.com/mlcommons/mlperf_inference_test_submissions_v5.0 --repo_branch=auto-update --commit_message="Results from R50 GH action on ${{ matrix.os }}" --quiet |
0 commit comments