forked from pytorch/benchmark
-
Notifications
You must be signed in to change notification settings - Fork 1
36 lines (35 loc) · 1.36 KB
/
v0-nightly.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: TorchBench V0 nightly
on:
workflow_dispatch:
schedule:
- cron: '0 13 * * *' # run at 1 PM UTC
jobs:
run-benchmark:
if: ${{ github.repository_owner == 'pytorch' }}
runs-on: [self-hosted, bm-runner]
env:
SCRIBE_GRAPHQL_ACCESS_TOKEN: ${{ secrets.SCRIBE_GRAPHQL_ACCESS_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: 0.1
- name: Run benchmark
run: |
bash ./.github/scripts/run-nightly-nodocker.sh
- name: Copy artifact
run: |
LATEST_RESULT=$(find ${HOME}/benchmark-results-v0.1/gh${GITHUB_RUN_ID}/ -name "*.json" | sort -r | head -1)
TODAY=$(date "+%Y%m%d%H%M%S")
cp ${LATEST_RESULT} ./benchmark-result-v0.1-${TODAY}.json
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: Benchmark result
path: benchmark-result-*.json
- name: Upload results to Amazon S3
run: |
LAST_MODIFIED_DIR=$(find ${HOME}/benchmark-results-v0.1/ -mindepth 1 -maxdepth 1 -type d -exec stat -t {} \; | sort -r -n -k 13,13 | head -1 | cut -d " " -f 1)
python ./scripts/upload_s3.py --torchbench-result-dir ${LAST_MODIFIED_DIR} --gen-index --upload-s3