-
Notifications
You must be signed in to change notification settings - Fork 3.6k
132 lines (115 loc) · 3.94 KB
/
benchmark.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
name: Benchmark
on:
# FIXME: Remove push trigger
push:
branches:
- akihironitta/bench
# FIXME: Enable weekly or nightly trigger instead
# schedule:
# - cron: '0 0,8,16 * * *'
# FIXME: For debugging purpose. Adjust this if necessary
concurrency:
group: benchmark
cancel-in-progress: true
defaults:
run:
shell: bash
working-directory: benchmarks
jobs:
benchmark:
if: github.repository == 'pyg-team/pytorch_geometric'
runs-on: [self-hosted, nvidia]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- name: Clean up mamba from previous jobs
continue-on-error: true
run: |
ls -al $HOME
rm -rf $HOME/.mambaforge
rm -rf $HOME/.conda*
rm -rf $HOME/micromamba*
ls -al $HOME
ls -al $HOME/*
ls -al /usr/local/bin/micromamba-shell || echo error
ls -al /usr/local/bin/micromamba-shellasdf || echo error
ls -al asd || echo error
# - uses: mamba-org/setup-micromamba@v1
# with:
# environment-name: benchmark
# create-args: 'python=3.10'
# init-shell: bash
- name: Check runner
if: always()
run: |
echo $HOME
nvidia-smi
which python conda mamba micromamba || echo error
mamba activate base || echo error
micromamba activate benchmark || echo error
- name: Set up conda
run: |
conda init bash
conda create -n benchmark python=3.10
conda activate benchmark
- name: Set up asv
run: |
python -m pip install -U pip
pip install "git+https://github.com/airspeed-velocity/asv.git@8f5c8af"
asv machine --machine "pyg-t4" --yes
# - name: Configure Git
# run: |
# git config --local user.name "${{ github.actor }}"
# git config --local user.email "${{ github.actor }}@users.noreply.github.com"
# git config --list
# - name: Run benchmarks on 2.3.0 and master
# timeout-minutes: 10 # FIXME: Adjust timeout
# run: |
# git branch --all
# asv run HASHFILE:HASHFILE.txt \
# --launch-method spawn \
# --skip-existing-successful \
# --verbose \
# --show-stderr \
# --bench scatter # FIXME: Run all benchmarks
# - name: Upload results
# uses: actions/upload-artifact@v3
# if: always()
# with:
# name: benchmark-result
# path: .asv/result
# TODO: Enable pulling results
# - name: Pull asv results
# # TODO: `.asv/results/` could be stored in another repo or S3 to lightweight the repo
# run: |
# git checkout results && git checkout master
# git checkout results .asv/results
# - name: Compare with master on pull request
# # Run only a small set of benchmarks for sanity check.
# # if: github.event_name == 'pull_request' # FIXME
# # Give 10min for other steps. GitHub Actions allow 360 at the maximum.
# timeout-minutes: 350
# run: |
# git branch --all
# # FIXME: Tighten the below ratio 2.0 to 1.1
# asv continuous -f 2.0 origin/master HEAD -e
# env:
# ASV_RUN_OPTIONS: "--skip-existing-successful --parallel -v -e"
# TODO: Enable uploading results and gh-pages
# - name: Push results and gh-pages if not on PR
# if: always() && github.event_name != 'pull_request'
# run: |
# # Push new page to `gh-pages` branch
# asv publish
# git fetch origin gh-pages:gh-pages
# asv gh-pages
# # Push new results to `results` branch
# mv .asv/results new_results
# git checkout $GIT_BRANCH_RESULTS
# rm -rf .asv/results
# mv new_results .asv/results
# git add .asv/results
# git commit -m "Add results from $(git rev-parse --short $GITHUB_SHA)" && git push origin $GIT_BRANCH_RESULTS || echo "No new results to push :)"
# env:
# GIT_BRANCH_RESULTS: results