diff --git a/.github/workflows/_ascend_npu_benchmark.yml b/.github/workflows/_ascend_npu_benchmark.yml index 6592cd4..1b479ee 100644 --- a/.github/workflows/_ascend_npu_benchmark.yml +++ b/.github/workflows/_ascend_npu_benchmark.yml @@ -19,6 +19,10 @@ on: required: true type: string description: 'The torch_npu distribution artifact name' + secrets: + pr-token: + description: 'A token used to create a pull request' + required: true # Bash shells do not use ~/.profile or ~/.bashrc so these shells need to be explicitly # declared as "shell: bash -el {0}" on steps that need to be properly activated. @@ -31,6 +35,8 @@ jobs: test: name: run benchmarks for torch_npu runs-on: ${{ inputs.runner }} + env: + HF_ENDPOINT: https://hf-mirror.com container: image: ${{ inputs.image }} volumes: @@ -100,8 +106,6 @@ jobs: run: | pip install -r benchmark/requirements.txt --constraint ascend_npu/requirements.txt "numpy==1.*" python benchmark/install.py --userbenchmark test_bench --continue_on_fail - env: - HF_ENDPOINT: https://hf-mirror.com - name: Install project dependencies run: | @@ -150,6 +154,7 @@ jobs: if: ${{ steps.update-readme.outputs.changed == 'true' }} uses: peter-evans/create-pull-request@v7 with: + token: ${{ secrets.pr-token }} add-paths: README.md branch: ascend-npu/benchmark title: "[Ascend NPU] Update torchbenchmark report in README.md" diff --git a/.github/workflows/ascend_npu_test.yml b/.github/workflows/ascend_npu_test.yml index abeb818..b628e07 100644 --- a/.github/workflows/ascend_npu_test.yml +++ b/.github/workflows/ascend_npu_test.yml @@ -122,3 +122,5 @@ jobs: image: ${{ needs.prepare.outputs.image }} device: ${{ needs.prepare.outputs.device }} artifact_name: ${{ needs.build.outputs.artifact_name }} + secrets: + pr-token: ${{ secrets.COSDT_BOT_TOKEN }}