Skip to content

Commit d3a564b

Browse files
authored
Update test-mlperf-inference-resnet50.yml
1 parent d3bd546 commit d3a564b

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

.github/workflows/test-mlperf-inference-resnet50.yml

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,18 @@ jobs:
5858
if: matrix.os != 'windows-latest'
5959
run: |
6060
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
6171
- name: Retrieve secrets from Keeper
62-
if: github.repository_owner == 'mlcommons'
72+
if: github.repository_owner == 'mlcommons' && env.run_step == 'true'
6373
id: ksecrets
6474
uses: Keeper-Security/ksm-action@master
6575
with:
@@ -69,7 +79,7 @@ jobs:
6979
- name: Push Results
7080
env:
7181
GITHUB_TOKEN: ${{ env.PAT }}
72-
if: github.repository_owner == 'mlcommons'
82+
if: github.repository_owner == 'mlcommons' && env.run_step == 'true'
7383
run: |
7484
git config --global user.name "mlcommons-bot"
7585
git config --global user.email "mlcommons-bot@users.noreply.github.com"
@@ -78,15 +88,4 @@ jobs:
7888
git config --global credential.https://gist.github.com.helper ""
7989
git config --global credential.https://gist.github.com.helper "!gh auth git-credential"
8090
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

Comments
 (0)