Kavlahkaff commited on
Commit
dfcde1c
·
verified ·
1 Parent(s): 2ad608a

v2: BBOmix evaluation tables for conditional proposals

Browse files
README.md CHANGED
@@ -13,15 +13,21 @@ viewer: false
13
 
14
  # AUTOENCODIX initial-config portfolios
15
 
16
- This repository holds the lookup table that
17
  [`autoencodix.propose_initial_config()`](https://github.com/jan-forest/autoencodix_package) uses to suggest
18
  a strong starting hyperparameter configuration for an AUTOENCODIX model. You don't have to tune
19
  from the generic schema defaults.
20
 
21
- The portfolios were computed **offline** by fitting Syne Tune's `ZeroShotTransfer` scheduler to the
22
- **BBOmix** benchmark: about 105,000 AUTOENCODIX training runs across several architectures, two
23
- datasets and many downstream tasks. At call time no optimizer runs. The package just looks up the
24
- JSON and validates the result with Pydantic.
 
 
 
 
 
 
25
 
26
  ## Usage
27
 
@@ -35,10 +41,13 @@ config = acx.propose_initial_config("varix")
35
  config = acx.propose_initial_config("varix", revision="v1")
36
 
37
  # list the available versions
38
- acx.tuning.list_portfolio_versions() # e.g. ["v1"]
 
 
 
39
  ```
40
 
41
- The package downloads `initial_configs.json` from here on first use and caches it locally with
42
  `huggingface_hub`. After that it also works offline (`HF_HUB_OFFLINE=1`). You can also use a
43
  portfolio of your own:
44
 
@@ -47,8 +56,23 @@ acx.propose_initial_config("varix", repo_id="<user>/<repo>")
47
  acx.propose_initial_config("varix", artifact_path="path/to/initial_configs.json") # local file, no Hub
48
  ```
49
 
 
 
 
50
  See the *Propose Initial Config* tutorial in the AUTOENCODIX docs for all options (`objective`,
51
- `budget_epochs`, `dataset`, `top_k`, overrides).
 
 
 
 
 
 
 
 
 
 
 
 
52
 
53
  ## Versions
54
 
@@ -59,17 +83,22 @@ that tag.
59
  | Tag | Description |
60
  |------|-------------|
61
  | `v1` | Initial BBOmix zero-shot portfolio: vanillix, varix, ontix, disentanglix; datasets `tcga`, `schc` |
 
62
 
63
  ### Publishing a new version (maintainers)
64
 
 
 
 
65
  ```bash
66
- hf upload autoencodix/initial-configs initial_configs.json initial_configs.json \
67
- --repo-type dataset --commit-message "Portfolio v2: <what changed>"
68
- hf repo tag create autoencodix/initial-configs v2 --repo-type dataset -m "<what changed>"
 
69
  ```
70
 
71
- Then add a row to the table above. The new file must keep the layout described below. The
72
- package checks dataset names and budgets against whatever the file contains, so you can add new
73
  datasets or budgets without a package release.
74
 
75
  ## File layout
@@ -115,6 +144,39 @@ configs.
115
  key holds configs tuned for training that many epochs (`epochs` and `checkpoint_interval` are
116
  set to the budget).
117
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
118
  ## License
119
 
120
  Apache-2.0, the same license as the AUTOENCODIX package.
 
13
 
14
  # AUTOENCODIX initial-config portfolios
15
 
16
+ This repository holds the data that
17
  [`autoencodix.propose_initial_config()`](https://github.com/jan-forest/autoencodix_package) uses to suggest
18
  a strong starting hyperparameter configuration for an AUTOENCODIX model. You don't have to tune
19
  from the generic schema defaults.
20
 
21
+ Everything here comes from the **BBOmix** benchmark: about 105,000 AUTOENCODIX training runs
22
+ across several architectures, two datasets and many downstream tasks. There are two kinds of files:
23
+
24
+ - **`initial_configs.json`**: ranked portfolios computed offline by fitting Syne Tune's
25
+ `ZeroShotTransfer` scheduler to BBOmix. A default call just looks up this JSON and validates the
26
+ result with Pydantic; no optimizer runs.
27
+ - **`evaluations/*.parquet` + `search_space.json`** (from `v2`): the BBOmix evaluations themselves,
28
+ in compact form. They are used when you fix some hyperparameters (`fixed={...}`). The package
29
+ then fits a random-forest surrogate on them and proposes the remaining hyperparameters *given*
30
+ your fixed values.
31
 
32
  ## Usage
33
 
 
41
  config = acx.propose_initial_config("varix", revision="v1")
42
 
43
  # list the available versions
44
+ acx.tuning.list_portfolio_versions() # e.g. ["v1", "v2"]
45
+
46
+ # fix some hyperparameters, propose the rest given them (needs v2 or later)
47
+ config = acx.propose_initial_config("varix", fixed={"latent_dim": 16, "batch_size": 64})
48
  ```
49
 
50
+ The package downloads the files it needs from here on first use and caches them locally with
51
  `huggingface_hub`. After that it also works offline (`HF_HUB_OFFLINE=1`). You can also use a
52
  portfolio of your own:
53
 
 
56
  acx.propose_initial_config("varix", artifact_path="path/to/initial_configs.json") # local file, no Hub
57
  ```
58
 
59
+ With `artifact_path` and `fixed`, the evaluation files are expected in this repository's layout
60
+ next to the JSON (`search_space.json`, `evaluations/<architecture>.parquet`).
61
+
62
  See the *Propose Initial Config* tutorial in the AUTOENCODIX docs for all options (`objective`,
63
+ `budget_epochs`, `dataset`, `top_k`, `fixed`, overrides).
64
+
65
+ ### `fixed` vs. overrides
66
+
67
+ Keyword overrides (`propose_initial_config("varix", latent_dim=16)`) only overwrite that field of
68
+ the static proposal. The other values stay the ones tuned together with a different `latent_dim`.
69
+ `fixed={"latent_dim": 16}` re-proposes the other hyperparameters for `latent_dim=16`.
70
+
71
+ In a leave-one-task-out check on the `v2` data, we held out each task, fixed one of `latent_dim`,
72
+ `n_layers`, `batch_size` or `k_filter` at several values, and compared proposals on the held-out
73
+ task among configs with that value. Conditional proposals reached the **87.7th percentile** on
74
+ average, compared with the 72.4th for the static top config + override. Conditional was better in
75
+ 81% of 546 cases, and it was better on average for every architecture and both objectives.
76
 
77
  ## Versions
78
 
 
83
  | Tag | Description |
84
  |------|-------------|
85
  | `v1` | Initial BBOmix zero-shot portfolio: vanillix, varix, ontix, disentanglix; datasets `tcga`, `schc` |
86
+ | `v2` | Same portfolio as `v1`, plus `evaluations/*.parquet` and `search_space.json` for conditional proposals (`fixed=`) |
87
 
88
  ### Publishing a new version (maintainers)
89
 
90
+ The evaluation files are produced by `benchmarking/tuning/export_evaluations.py` in the
91
+ AUTOENCODIX repository, from the local Syne Tune blackbox repository.
92
+
93
  ```bash
94
+ python benchmarking/tuning/export_evaluations.py --out <dir> # evaluations/ + search_space.json
95
+ hf upload autoencodix/initial-configs <dir> . --repo-type dataset \
96
+ --commit-message "Portfolio v3: <what changed>"
97
+ hf repo tag create autoencodix/initial-configs v3 --repo-type dataset -m "<what changed>"
98
  ```
99
 
100
+ Then add a row to the table above. The files must keep the layouts described below. The
101
+ package checks dataset names and budgets against whatever the files contain, so you can add new
102
  datasets or budgets without a package release.
103
 
104
  ## File layout
 
144
  key holds configs tuned for training that many epochs (`epochs` and `checkpoint_interval` are
145
  set to the budget).
146
 
147
+ ### `search_space.json`
148
+
149
+ ```text
150
+ {
151
+ "constants": {"epochs": 300, "checkpoint_interval": 300, "loss_reduction": "sum"}, # held constant in BBOmix
152
+ "budgets": [10, 25, 50, 100, 150, 200, 300], # reconstruction budgets in the evaluation tables
153
+ "architectures": {
154
+ "<architecture>": {
155
+ "<hp>": {"choices": [...], "low": .., "high": ..}, # grid-sampled (integer) hps
156
+ "<hp>": {"scale": "log" | "linear", "low": .., "high": ..}, # continuous hps
157
+ ...
158
+ }
159
+ }
160
+ }
161
+ ```
162
+
163
+ `low`/`high` are the range actually covered by the evaluations, which can be narrower than the
164
+ declared BBOmix search space. Only these hyperparameters can be fixed. Fixed values outside the
165
+ range trigger a warning, because the proposal is then extrapolated.
166
+
167
+ ### `evaluations/<architecture>.parquet`
168
+
169
+ One row per (task, config). All tasks of a dataset share the same 1000 sampled configs.
170
+
171
+ | Column | Meaning |
172
+ |--------|---------|
173
+ | `dataset` | BBOmix dataset, e.g. `tcga`, `schc` |
174
+ | `task` | BBOmix task (data modality combination, plus ontology for ontix) |
175
+ | `config_id` | Index of the config within its dataset |
176
+ | `<hp>` columns | Hyperparameter values, as in `search_space.json` |
177
+ | `downstream` | `metric_avg_ml_task_performance` at the final epoch, mean over 3 seeds (higher is better) |
178
+ | `reconstruction_<b>` | `metric_valid_recon_loss` at epoch `b`, mean over 3 seeds (lower is better) |
179
+
180
  ## License
181
 
182
  Apache-2.0, the same license as the AUTOENCODIX package.
evaluations/disentanglix.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:095bbd4fc8da7dac0f3c73dcadd44b86ff3462b3b177036df520dbada46259f9
3
+ size 395506
evaluations/ontix.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1b3bf11dc873b77da184d675ec2ede5f08d87c9cb2d589f0d76add02db87d191
3
+ size 706454
evaluations/vanillix.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1e23d565cb77e52c5789b96a2a187b6d5c3d48c2143a6aab7a315c3bbce1e0df
3
+ size 363896
evaluations/varix.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0f258380ba3f1497a2b55a7f02d73a1bc1bd5e37826367006baa14f1d49e62be
3
+ size 374823
search_space.json ADDED
@@ -0,0 +1,311 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "constants": {
3
+ "epochs": 300,
4
+ "checkpoint_interval": 300,
5
+ "loss_reduction": "sum"
6
+ },
7
+ "budgets": [
8
+ 10,
9
+ 25,
10
+ 50,
11
+ 100,
12
+ 150,
13
+ 200,
14
+ 300
15
+ ],
16
+ "architectures": {
17
+ "vanillix": {
18
+ "k_filter": {
19
+ "choices": [
20
+ 128,
21
+ 256,
22
+ 512,
23
+ 1024,
24
+ 2048,
25
+ 4096
26
+ ],
27
+ "low": 128,
28
+ "high": 4096
29
+ },
30
+ "n_layers": {
31
+ "choices": [
32
+ 2,
33
+ 3,
34
+ 4
35
+ ],
36
+ "low": 2,
37
+ "high": 4
38
+ },
39
+ "enc_factor": {
40
+ "choices": [
41
+ 1,
42
+ 2,
43
+ 3,
44
+ 4
45
+ ],
46
+ "low": 1,
47
+ "high": 4
48
+ },
49
+ "batch_size": {
50
+ "choices": [
51
+ 32,
52
+ 64,
53
+ 128,
54
+ 256
55
+ ],
56
+ "low": 32,
57
+ "high": 256
58
+ },
59
+ "learning_rate": {
60
+ "scale": "log",
61
+ "low": 1.0207919389761473e-05,
62
+ "high": 0.09854177738894777
63
+ },
64
+ "drop_p": {
65
+ "scale": "linear",
66
+ "low": 0.00031825130718524667,
67
+ "high": 0.8995006217338251
68
+ },
69
+ "weight_decay": {
70
+ "scale": "log",
71
+ "low": 1.0077964816880098e-05,
72
+ "high": 0.0999578174192585
73
+ },
74
+ "latent_dim": {
75
+ "choices": [
76
+ 2,
77
+ 4,
78
+ 8,
79
+ 16,
80
+ 32,
81
+ 64
82
+ ],
83
+ "low": 2,
84
+ "high": 64
85
+ }
86
+ },
87
+ "varix": {
88
+ "k_filter": {
89
+ "choices": [
90
+ 128,
91
+ 256,
92
+ 512,
93
+ 1024,
94
+ 2048,
95
+ 4096
96
+ ],
97
+ "low": 128,
98
+ "high": 4096
99
+ },
100
+ "n_layers": {
101
+ "choices": [
102
+ 2,
103
+ 3,
104
+ 4
105
+ ],
106
+ "low": 2,
107
+ "high": 4
108
+ },
109
+ "enc_factor": {
110
+ "choices": [
111
+ 1,
112
+ 2,
113
+ 3,
114
+ 4
115
+ ],
116
+ "low": 1,
117
+ "high": 4
118
+ },
119
+ "batch_size": {
120
+ "choices": [
121
+ 32,
122
+ 64,
123
+ 128,
124
+ 256
125
+ ],
126
+ "low": 32,
127
+ "high": 256
128
+ },
129
+ "learning_rate": {
130
+ "scale": "log",
131
+ "low": 1.0052950994489815e-05,
132
+ "high": 0.09875932708929694
133
+ },
134
+ "drop_p": {
135
+ "scale": "linear",
136
+ "low": 0.002751654311746721,
137
+ "high": 0.8995006217338251
138
+ },
139
+ "weight_decay": {
140
+ "scale": "log",
141
+ "low": 1.000328971683056e-05,
142
+ "high": 0.09837910977086362
143
+ },
144
+ "beta": {
145
+ "scale": "log",
146
+ "low": 0.0001015579593600663,
147
+ "high": 0.9995781741925843
148
+ },
149
+ "latent_dim": {
150
+ "choices": [
151
+ 2,
152
+ 4,
153
+ 8,
154
+ 16,
155
+ 32,
156
+ 64
157
+ ],
158
+ "low": 2,
159
+ "high": 64
160
+ }
161
+ },
162
+ "ontix": {
163
+ "k_filter": {
164
+ "choices": [
165
+ 128,
166
+ 256,
167
+ 512,
168
+ 1024,
169
+ 2048,
170
+ 4096
171
+ ],
172
+ "low": 128,
173
+ "high": 4096
174
+ },
175
+ "n_layers": {
176
+ "choices": [
177
+ 2,
178
+ 3,
179
+ 4
180
+ ],
181
+ "low": 2,
182
+ "high": 4
183
+ },
184
+ "enc_factor": {
185
+ "choices": [
186
+ 1,
187
+ 2,
188
+ 3,
189
+ 4
190
+ ],
191
+ "low": 1,
192
+ "high": 4
193
+ },
194
+ "batch_size": {
195
+ "choices": [
196
+ 32,
197
+ 64,
198
+ 128,
199
+ 256
200
+ ],
201
+ "low": 32,
202
+ "high": 256
203
+ },
204
+ "learning_rate": {
205
+ "scale": "log",
206
+ "low": 1.000328971683056e-05,
207
+ "high": 0.09921147863447119
208
+ },
209
+ "drop_p": {
210
+ "scale": "linear",
211
+ "low": 0.001259965328730206,
212
+ "high": 0.8994950018997666
213
+ },
214
+ "weight_decay": {
215
+ "scale": "log",
216
+ "low": 1.0160512115112301e-05,
217
+ "high": 0.09997846955826961
218
+ },
219
+ "beta": {
220
+ "scale": "log",
221
+ "low": 0.00010146454456689534,
222
+ "high": 0.9684601729867341
223
+ }
224
+ },
225
+ "disentanglix": {
226
+ "k_filter": {
227
+ "choices": [
228
+ 128,
229
+ 256,
230
+ 512,
231
+ 1024,
232
+ 2048,
233
+ 4096
234
+ ],
235
+ "low": 128,
236
+ "high": 4096
237
+ },
238
+ "n_layers": {
239
+ "choices": [
240
+ 2,
241
+ 3,
242
+ 4
243
+ ],
244
+ "low": 2,
245
+ "high": 4
246
+ },
247
+ "enc_factor": {
248
+ "choices": [
249
+ 1,
250
+ 2,
251
+ 3,
252
+ 4
253
+ ],
254
+ "low": 1,
255
+ "high": 4
256
+ },
257
+ "batch_size": {
258
+ "choices": [
259
+ 32,
260
+ 64,
261
+ 128,
262
+ 256
263
+ ],
264
+ "low": 32,
265
+ "high": 256
266
+ },
267
+ "learning_rate": {
268
+ "scale": "log",
269
+ "low": 1.0298900014766878e-05,
270
+ "high": 0.09875932708929694
271
+ },
272
+ "drop_p": {
273
+ "scale": "linear",
274
+ "low": 0.0003089737316932961,
275
+ "high": 0.899499219679429
276
+ },
277
+ "weight_decay": {
278
+ "scale": "log",
279
+ "low": 1.0209532496205165e-05,
280
+ "high": 0.09615619068896737
281
+ },
282
+ "latent_dim": {
283
+ "choices": [
284
+ 2,
285
+ 4,
286
+ 8,
287
+ 16,
288
+ 32,
289
+ 64
290
+ ],
291
+ "low": 2,
292
+ "high": 64
293
+ },
294
+ "beta_mi": {
295
+ "scale": "log",
296
+ "low": 0.00010060475401698013,
297
+ "high": 0.9977803145650433
298
+ },
299
+ "beta_tc": {
300
+ "scale": "log",
301
+ "low": 0.010472424642301324,
302
+ "high": 985.2670858275624
303
+ },
304
+ "beta_dimKL": {
305
+ "scale": "log",
306
+ "low": 0.00010032622015055023,
307
+ "high": 0.9973010044095937
308
+ }
309
+ }
310
+ }
311
+ }