|
58 | 58 | if: matrix.os != 'windows-latest'
|
59 | 59 | run: |
|
60 | 60 | mlcr --tags=run-mlperf,inference,_submission,_short --submitter="MLCommons" --pull_changes=yes --pull_inference_changes=yes --hw_name=gh_${{ matrix.os }}_x86 --model=resnet50 --implementation=${{ matrix.implementation }} --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --test_query_count=500 --target_qps=1 -v --quiet
|
| 61 | + - name: Randomly Execute Step |
| 62 | + id: random-check |
| 63 | + run: | |
| 64 | + RANDOM_NUMBER=$((RANDOM % 10)) |
| 65 | + echo "Random number is $RANDOM_NUMBER" |
| 66 | + if [ "$RANDOM_NUMBER" -eq 0 ]; then |
| 67 | + echo "run_step=true" >> $GITHUB_ENV |
| 68 | + else |
| 69 | + echo "run_step=false" >> $GITHUB_ENV |
| 70 | + fi |
61 | 71 | - name: Retrieve secrets from Keeper
|
62 |
| - if: github.repository_owner == 'mlcommons' |
| 72 | + if: github.repository_owner == 'mlcommons' && env.run_step == 'true' |
63 | 73 | id: ksecrets
|
64 | 74 | uses: Keeper-Security/ksm-action@master
|
65 | 75 | with:
|
|
69 | 79 | - name: Push Results
|
70 | 80 | env:
|
71 | 81 | GITHUB_TOKEN: ${{ env.PAT }}
|
72 |
| - if: github.repository_owner == 'mlcommons' |
| 82 | + if: github.repository_owner == 'mlcommons' && env.run_step == 'true' |
73 | 83 | run: |
|
74 | 84 | git config --global user.name "mlcommons-bot"
|
75 | 85 | git config --global user.email "mlcommons-bot@users.noreply.github.com"
|
|
78 | 88 | git config --global credential.https://gist.github.com.helper ""
|
79 | 89 | git config --global credential.https://gist.github.com.helper "!gh auth git-credential"
|
80 | 90 | mlcr --tags=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
|
81 |
| - - name: Push Results |
82 |
| - env: |
83 |
| - GITHUB_TOKEN: ${{ secrets.PAT1 }} |
84 |
| - if: github.repository_owner == 'gateoverflow' |
85 |
| - run: | |
86 |
| - git config --global user.name "mlcommons-bot" |
87 |
| - git config --global user.email "mlcommons-bot@users.noreply.github.com" |
88 |
| - git config --global credential.https://github.com.helper "" |
89 |
| - git config --global credential.https://github.com.helper "!gh auth git-credential" |
90 |
| - git config --global credential.https://gist.github.com.helper "" |
91 |
| - git config --global credential.https://gist.github.com.helper "!gh auth git-credential" |
92 |
| - mlcr --tags=push,github,mlperf,inference,submission --repo_url=https://github.com/gateoverflow/mlperf_inference_test_submissions_v5.0 --repo_branch=auto-update --commit_message="Results from R50 GH action on ${{ matrix.os }}" --quiet |
| 91 | + |
0 commit comments