diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index cc5113a052..fc4109acdc 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -10,17 +10,26 @@ env: jobs: format-code: + if: github.actor != 'mlc-automations' runs-on: ubuntu-latest permissions: contents: write steps: + - name: Generate GitHub App token + id: app-token + uses: actions/create-github-app-token@v1 + with: + app-id: ${{ secrets.MLC_AUTOMATIONS_APP_ID }} + private-key: ${{ secrets.MLC_AUTOMATIONS_PRIVATE_KEY }} + - name: Checkout code uses: actions/checkout@v4 with: fetch-depth: 0 + token: ${{ steps.app-token.outputs.token }} - name: Set up Python ${{ env.python_version }} - uses: actions/setup-python@v3 + uses: actions/setup-python@v5 with: python-version: ${{ env.python_version }} @@ -55,10 +64,10 @@ jobs: run: | HAS_CHANGES=$(git diff --staged --name-only) if [ ${#HAS_CHANGES} -gt 0 ]; then - git config --global user.name github-actions[bot] - git config --global user.email "github-actions[bot]@users.noreply.github.com" + # Use the GitHub actor's name and email + git config --global user.name mlc-automations + git config --global user.email "3246381+mlc-automations@users.noreply.github.com" # Commit changes git commit -m '[Automated Commit] Format Codebase' - # Use the GITHUB_TOKEN to push changes - git push + git push fi diff --git a/main.py b/main.py index 17d01fe11f..f76e510bd3 100755 --- a/main.py +++ b/main.py @@ -70,8 +70,8 @@ def mlperf_inference_implementation_readme( frameworks = ["Pytorch"] elif implementation == "nvidia": - if model in ["retinanet", "resnet50", - "3d-unet-99", "3d-unet-99.9", "llama2-70b-99", "llama2-70b-99.9"]: + if model in ["retinanet", "resnet50", "3d-unet-99", + "3d-unet-99.9", "llama2-70b-99", "llama2-70b-99.9"]: code_version = "r5.1-dev" if model in ["mixtral-8x7b"]: return pre_space + " WIP" @@ -156,8 +156,8 @@ def mlperf_inference_implementation_readme( for category in categories: if category == "Edge": scenarios = ["Offline", "SingleStream"] - if model.lower() in [ - "resnet50", "retinanet", "yolo-95", "yolo-99"] and not "MultiStream" in scenarios: # MultiStream was duplicating + if model.lower() in ["resnet50", "retinanet", "yolo-95", + "yolo-99"] and not "MultiStream" in scenarios: # MultiStream was duplicating scenarios.append("MultiStream") if model.lower() in ["pointpainting"]: scenarios.remove("Offline")