-
-
Notifications
You must be signed in to change notification settings - Fork 969
147 lines (124 loc) · 4.5 KB
/
performance-benchmarks-bayesmark.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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
name: Performance benchmarks with bayesmark
on:
workflow_dispatch:
inputs:
sampler-list:
description: 'Sampler List: A list of samplers to check the performance. Should be a whitespace-separated list of Optuna samplers. Each sampler must exist under `optuna.samplers` or `optuna.integration`.'
required: false
default: 'TPESampler CmaEsSampler'
sampler-kwargs-list:
description: 'Sampler Arguments List: A list of sampler keyword arguments. Should be a whitespace-separated list of json format dictionaries.'
required: false
default: '{"multivariate":true,"constant_liar":true} {}'
pruner-list:
description: 'Pruner List: A list of pruners to check the performance. Should be a whitespace-separated list of Optuna pruners. Each pruner must exist under `optuna.pruners`.'
required: false
default: 'NopPruner'
pruner-kwargs-list:
description: 'Pruner Arguments List: A list of pruner keyword arguments. Should be a whitespace-separated list of json format dictionaries.'
required: false
default: '{}'
budget:
description: 'Number of Trials if the pruning is not enabled. If the pruning is enabled, the total number of steps is equal to `budget * (steps per trial)`.'
required: false
default: '80'
n-runs:
description: 'Number of Studies'
required: false
default: '10'
plot-warmup:
description: Include warm-up steps in plots.
type: boolean
default: true
jobs:
benchmarks:
runs-on: ubuntu-latest
strategy:
matrix:
dataset: [breast, digits, iris, wine, diabetes]
model: [kNN, SVM, DT, RF, MLP-sgd, ada, linear]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python3.9
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install Python libraries
run: |
python -m pip install --upgrade pip
pip install --progress-bar off -U setuptools wheel
pip install --progress-bar off .
python -c 'import optuna'
optuna --version
pip install --progress-bar off .[benchmark] --extra-index-url https://download.pytorch.org/whl/cpu
pip install --progress-bar off bayesmark matplotlib pandas
- name: Output installed packages
run: |
pip freeze --all
- name: Output dependency tree
run: |
pip install pipdeptree
pipdeptree
- name: Run performance benchmark
run: |
python benchmarks/run_bayesmark.py \
--dataset ${{ matrix.dataset }} \
--model ${{ matrix.model }} \
--name-prefix "" \
--budget ${{ github.event.inputs.budget }} \
--n-runs ${{ github.event.inputs.n-runs }} \
--sampler-list '${{ github.event.inputs.sampler-list }}' \
--sampler-kwargs-list '${{ github.event.inputs.sampler-kwargs-list }}' \
--pruner-list '${{ github.event.inputs.pruner-list }}' \
--pruner-kwargs-list '${{ github.event.inputs.pruner-kwargs-list }}' \
--plot-warmup '${{ github.event.inputs.plot-warmup }}'
- name: Upload plot
uses: actions/upload-artifact@v3
with:
name: benchmark-plots
path: plots
- name: Upload partial report
uses: actions/upload-artifact@v3
with:
name: partial-reports
path: partial
report:
needs: benchmarks
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download partial reports
uses: actions/download-artifact@v2
with:
name: partial-reports
path: partial
- name: Setup Python3.9
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install Python libraries
run: |
python -m pip install --upgrade pip
pip install --progress-bar off -U setuptools wheel
pip install --progress-bar off numpy scipy pandas Jinja2
- name: Output installed packages
run: |
pip freeze --all
- name: Output dependency tree
run: |
pip install pipdeptree
pipdeptree
- name: Run benchmark report builder
run: |
python benchmarks/bayesmark/report_bayesmark.py
- name: Upload report
uses: actions/upload-artifact@v3
with:
name: benchmark-report
path: report
- name: Cleanup partial reports
uses: geekyeggo/delete-artifact@v1
with:
name: partial-reports