-
Notifications
You must be signed in to change notification settings - Fork 2
124 lines (103 loc) · 3.82 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
name: benchmark
on:
workflow_dispatch:
push:
branches:
- master
paths:
- 'src/**'
- "benchmark/*.py"
pull_request:
branches:
- master
paths:
- 'src/**'
- "benchmark/*.py"
jobs:
# write_benchmark:
# if: github.event_name == 'push'
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - name: Create new branch
# run: git checkout -b actions/benchmark
# - name: Set branch upstream
# run: git push -u origin actions/benchmark
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Setup Python
# uses: actions/setup-python@v4
# with:
# cache: 'pip'
# cache-dependency-path: setup.py
# - name: Set up ArangoDB Instance via Docker
# run: docker run -d --name arangodb -p 8529:8529 -e ARANGO_ROOT_PASSWORD= arangodb/arangodb
# - name: Start Jaeger Instance
# run: docker run -d --name jaeger --rm \
# -e COLLECTOR_ZIPKIN_HOST_PORT=:9411 \
# -p 16686:16686 \
# -p 4317:4317 \
# -p 4318:4318 \
# -p 9411:9411 \
# jaegertracing/all-in-one:latest
# - name: Install packages
# run: |
# pip install torch==2.1.0
# pip install torch-scatter torch-sparse -f https://data.pyg.org/whl/torch-$(python -c 'import torch; print(torch.__version__.split("+")[0])')+cpu.html
# pip install -e '.[dev, tracing]'
# - name: Run Python Script
# run: python benchmark/write.py --output_dir head
# - name: Make commit for auto-generated benchmark files
# uses: EndBug/add-and-commit@v9
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# add: "./benchmark/main/*.json"
# new_branch: actions/benchmark
# message: "generate benchmark files for $GITHUB_SHA"
# - name: Create pull request for the auto generated changelog
# run: |
# echo "PR_URL=$(gh pr create \
# --title "benchmark: $GITHUB_SHA" \
# --body "beep boop, i am a robot ($GITHUB_SHA)" \
# --label documentation)" >> $GITHUB_ENV
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Alert developer of open PR
# run: echo "Benchmark $PR_URL is ready to be merged by developer."
compare_benchmarks:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
cache: 'pip'
cache-dependency-path: setup.py
- name: Set up ArangoDB Instance via Docker
run: docker run -d --name arangodb -p 8529:8529 -e ARANGO_ROOT_PASSWORD= arangodb/arangodb
- name: Start Jaeger Instance
run: docker run -d --name jaeger --rm \
-e COLLECTOR_ZIPKIN_HOST_PORT=:9411 \
-p 16686:16686 \
-p 4317:4317 \
-p 4318:4318 \
-p 9411:9411 \
jaegertracing/all-in-one:latest
- name: Install packages
run: |
pip install torch==2.1.0
pip install torch-scatter torch-sparse -f https://data.pyg.org/whl/torch-$(python -c 'import torch; print(torch.__version__.split("+")[0])')+cpu.html
pip install -e '.[dev, tracing]'
- name: Run Benchmark Write for PR
run: python benchmark/write.py --output_dir branch
- name: Run Benchmark Comparison against main
run: python benchmark/compare.py
- name: Echo PyG to ArangoDB Comparison
run: cat benchmark/diff/pyg_to_arangodb.json | jq
- name: Echo ArangoDB to PyG Comparison
run: cat benchmark/diff/arangodb_to_pyg.json | jq