Auto-merge updates from auto-update branch #1317
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: MLPerf inference results updater | |
on: | |
push: | |
branches: [ "main" ] | |
paths: | |
- closed/** | |
- open/** | |
jobs: | |
update-results: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [ "3.10" ] | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ssh-key: ${{ secrets.DEPLOY_KEY }} | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python3 -m pip install mlcflow | |
mlc pull repo mlcommons@mlperf-automations --branch=dev | |
- name: Run MLPerf Inference Submission Checker and generate results summary | |
run: | | |
git pull | |
mlcr --tags=run,mlperf,inference,submission-checker,_short-run --src_version=v5.0 --adr.inference-src.tags=_branch.dev --repo_name=${{ github.event.repository.name }} --repo_owner=${{ github.repository_owner }} --repo_branch=${{ github.ref_name }} --quiet --extra_args=" --skip-extra-files-in-root-check" --submission_dir=./ > >(tee -a out.txt) 2> >(tee -a checker_log.txt >&2) | |
mlcr --tags=convert,from-csv,to-md --csv_file=summary.csv --md_file=README.md | |
USER="mlcommons-bot" | |
EMAIL="[email protected]" | |
git config --global user.name "$USER" | |
git config --global user.email "$EMAIL" | |
git add summary* | |
echo -e 'Please download [summary.xlsx](summary.xlsx) to view the most recent results. \n ```' > temp | |
tail -n 16 checker_log.txt >> temp | |
echo -e '\n```\n' >> temp | |
cat temp | cat - README.md > temp1 | |
head -n 100 temp1 > README.md | |
git add README.md | |
ver_num=$(cat dbversion) | |
let ver_num++ | |
git diff-index --quiet HEAD || (echo "$ver_num" > dbversion && git add dbversion && git commit -am "Updated results summary [skip ci]" && git pull --rebase && (git push || (sleep $((RANDOM % 300 + 1)) && git pull && git push))) |