h2o64 commited on
Commit
b4bf54d
·
verified ·
1 Parent(s): b47ff1d

Write the dataset card of v3

Browse files
Files changed (1) hide show
  1. README.md +41 -6
README.md CHANGED
@@ -1,6 +1,6 @@
1
  ---
2
  license: mit
3
- pretty_name: samplingdb reference sets
4
  tags:
5
  - sampling
6
  - mcmc
@@ -20,6 +20,8 @@ library of unnormalised densities for benchmarking samplers. A sampler's output
20
  these sets. Each one comes from a long Markov chain run on the target's own density (MCMC, or
21
  replica-exchange molecular dynamics for the peptides), or from an exact sampler where the posterior
22
  allows one, and passed the convergence and independence checks below before it was published here.
 
 
23
 
24
  You do not need to download anything by hand. samplingdb fetches a set the first time it is used,
25
  checks its sha256, and keeps it in its cache.
@@ -35,6 +37,7 @@ from samplingdb import build
35
 
36
  target = build('lj55')
37
  reference = target.test_samples(n=10000) # downloads the set once (66 MB), then reads the cache
 
38
  metrics = target.compute_metrics(samples) # samples: your sampler's output, same shape
39
  ```
40
 
@@ -44,14 +47,14 @@ To fetch sets ahead of time, for example before a job on machines with no intern
44
  import samplingdb
45
 
46
  samplingdb.download_references(['lj55', 'ace-a-nme-T300']) # by catalog name
47
- samplingdb.download_references() # every published set, 3.1 GB
48
  ```
49
 
50
  The cache is `~/.cache/samplingdb`, or the directory `SAMPLINGDB_CACHE` names. It is laid out like
51
  this repo, so a copy of the repo is a ready cache:
52
 
53
  ```sh
54
- hf download h2o64/samplingdb --repo-type dataset --revision v2 --local-dir "$SAMPLINGDB_CACHE"
55
  ```
56
 
57
  Without samplingdb, every file is a plain NumPy array:
@@ -60,7 +63,7 @@ Without samplingdb, every file is a plain NumPy array:
60
  import numpy as np
61
  from huggingface_hub import hf_hub_download
62
 
63
- path = hf_hub_download('h2o64/samplingdb', 'pt/dw4_d9994289.npy', repo_type='dataset', revision='v2')
64
  x = np.load(path) # (n_samples, dim)
65
  ```
66
 
@@ -77,8 +80,10 @@ Each row of an array is one sample, flattened, in the coordinates the samplingdb
77
  | `md/` | peptides | atom positions in nanometres, in the atom order of the released PDB |
78
  | `stan/` | Bayesian posteriors | the unconstrained parameters, in samplingdb's order |
79
  | `exact/` | the Brownian motion posterior | the unconstrained parameters, in samplingdb's order |
 
80
 
81
- A file is named `<folder>/<target name>_<spec_id>.npy`. The `spec_id` is a hash of the constants
 
82
  that define the density, so a set can never be read against a different density than the one it
83
  was drawn from. Next to every array, `<same name>_manifest.json` records the target, its `spec_id`,
84
  the full generation protocol with its diagnostics, and the array's sha256.
@@ -103,11 +108,39 @@ the full generation protocol with its diagnostics, and the array's sha256.
103
  | `md/ace-aaa-nme-T300_cda31701.npy` | `ace-aaa-nme-T300` | 100000 | 126 | float32 | 50.4 MB | 94% effective |
104
  | `swapmc/ka-ternary-N44-T0.32_d50e8a3f.npy` | `ka-ternary-N44-T0.32` | 131072 | 88 | float32 | 46.1 MB | 93% effective |
105
  | `swapmc/ka-ternary-N44-T1.0_c0f9b3b8.npy` | `ka-ternary-N44-T1.0` | 163840 | 88 | float32 | 57.7 MB | 92% effective |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
106
 
107
  Independence is the effective sample size as a fraction of the rows: measured on the stored chains
108
  for the tempered runs and the glass, and Stan's smallest bulk ESS for the posteriors, which exceeds
109
  100% where successive NUTS draws are anticorrelated. The exact draws are independent by
110
- construction.
111
 
112
  The rows are interleaved across chains, so the first `n` rows of a file span every chain of the run
113
  that produced it, and `test_samples(n=...)` can read a prefix.
@@ -124,6 +157,7 @@ documents each protocol and its acceptance checks in `docs/reference-sets.md`.
124
  | `swapmc/` | swap Monte Carlo on the GPU, 16 384 chains started from equilibrated configurations and stored at a fixed spacing | the merged set is at least 90% independent on the energy and the pair distances, with no drift from its start, and the specific heat agrees between the two halves of the run |
125
  | `stan/` | Stan's NUTS, on models written in samplingdb's own coordinates | Stan's log density equals samplingdb's to 1e-9; R-hat below 1.01, bulk ESS above 90% of the draws, no divergences |
126
  | `exact/` | rejection sampling of the two log scales from their priors against the bounded marginal likelihood, then the locations from their exact Gaussian conditional | the factorised density equals samplingdb's up to a constant, to 1e-8 across 1000 random points; every proposal stays below the bound |
 
127
 
128
  ## Versions
129
 
@@ -136,6 +170,7 @@ changes its bytes under a new tag; samplingdb refuses a cached copy from another
136
  | --- | --- |
137
  | `v1` | 17 sets |
138
  | `v2` | the Brownian posterior from an exact sampler, under `exact/` in place of `stan/`; both ternary glass sets regenerated on the GPU; the three particle sets, unchanged, under new names, since the particle count joined their `spec_id`; the binary Kob-Andersen glass at T = 0.2, published for the first time; every set under the MIT License, in place of CC BY 4.0 |
 
139
 
140
  ## License and attribution
141
 
 
1
  ---
2
  license: mit
3
+ pretty_name: samplingdb reference sets and train splits
4
  tags:
5
  - sampling
6
  - mcmc
 
20
  these sets. Each one comes from a long Markov chain run on the target's own density (MCMC, or
21
  replica-exchange molecular dynamics for the peptides), or from an exact sampler where the posterior
22
  allows one, and passed the convergence and independence checks below before it was published here.
23
+ The repo also holds every target's default train split, the cheap and biased set a sampler may
24
+ learn from, so that every user reads the same one.
25
 
26
  You do not need to download anything by hand. samplingdb fetches a set the first time it is used,
27
  checks its sha256, and keeps it in its cache.
 
37
 
38
  target = build('lj55')
39
  reference = target.test_samples(n=10000) # downloads the set once (66 MB), then reads the cache
40
+ train = target.train_samples() # the published train split, downloaded once
41
  metrics = target.compute_metrics(samples) # samples: your sampler's output, same shape
42
  ```
43
 
 
47
  import samplingdb
48
 
49
  samplingdb.download_references(['lj55', 'ace-a-nme-T300']) # by catalog name
50
+ samplingdb.download_references() # every published set, 6.3 GB
51
  ```
52
 
53
  The cache is `~/.cache/samplingdb`, or the directory `SAMPLINGDB_CACHE` names. It is laid out like
54
  this repo, so a copy of the repo is a ready cache:
55
 
56
  ```sh
57
+ hf download h2o64/samplingdb --repo-type dataset --revision v3 --local-dir "$SAMPLINGDB_CACHE"
58
  ```
59
 
60
  Without samplingdb, every file is a plain NumPy array:
 
63
  import numpy as np
64
  from huggingface_hub import hf_hub_download
65
 
66
+ path = hf_hub_download('h2o64/samplingdb', 'pt/dw4_d9994289.npy', repo_type='dataset', revision='v3')
67
  x = np.load(path) # (n_samples, dim)
68
  ```
69
 
 
80
  | `md/` | peptides | atom positions in nanometres, in the atom order of the released PDB |
81
  | `stan/` | Bayesian posteriors | the unconstrained parameters, in samplingdb's order |
82
  | `exact/` | the Brownian motion posterior | the unconstrained parameters, in samplingdb's order |
83
+ | `train/` | every target | the coordinates of the target's own folder above, or its `log_prob`'s |
84
 
85
+ A file is named `<folder>/<target name>_<spec_id>.npy`, and a train split
86
+ `train/<target name>_<spec_id>_<recipe>.npy`. The `spec_id` is a hash of the constants
87
  that define the density, so a set can never be read against a different density than the one it
88
  was drawn from. Next to every array, `<same name>_manifest.json` records the target, its `spec_id`,
89
  the full generation protocol with its diagnostics, and the array's sha256.
 
108
  | `md/ace-aaa-nme-T300_cda31701.npy` | `ace-aaa-nme-T300` | 100000 | 126 | float32 | 50.4 MB | 94% effective |
109
  | `swapmc/ka-ternary-N44-T0.32_d50e8a3f.npy` | `ka-ternary-N44-T0.32` | 131072 | 88 | float32 | 46.1 MB | 93% effective |
110
  | `swapmc/ka-ternary-N44-T1.0_c0f9b3b8.npy` | `ka-ternary-N44-T1.0` | 163840 | 88 | float32 | 57.7 MB | 92% effective |
111
+ | `train/funnel_556b9f8f_uniform-neck.npy` | `funnel` | 100000 | 10 | float64 | 8.0 MB | train split, recipe uniform-neck |
112
+ | `train/manywell_30beb4d2_uniform-sides.npy` | `manywell` | 100000 | 32 | float64 | 25.6 MB | train split, recipe uniform-sides |
113
+ | `train/gmm40_a1f669cb_skewed-modes.npy` | `gmm40` | 100000 | 2 | float64 | 1.6 MB | train split, recipe skewed-modes |
114
+ | `train/mos_3d819321_skewed-modes.npy` | `mos` | 100000 | 2 | float64 | 1.6 MB | train split, recipe skewed-modes |
115
+ | `train/twomodes_0eddf6c9_skewed-modes.npy` | `twomodes` | 100000 | 2 | float64 | 1.6 MB | train split, recipe skewed-modes |
116
+ | `train/brackettwomodes_334746c8_skewed-modes.npy` | `brackettwomodes` | 100000 | 2 | float64 | 1.6 MB | train split, recipe skewed-modes |
117
+ | `train/manymodes-k3_edf2fcb2_skewed-modes.npy` | `manymodes-k3` | 100000 | 2 | float64 | 1.6 MB | train split, recipe skewed-modes |
118
+ | `train/eightgaussians_ae0110e3_skewed-modes.npy` | `eightgaussians` | 100000 | 2 | float64 | 1.6 MB | train split, recipe skewed-modes |
119
+ | `train/rings_5deb01ff_skewed-modes.npy` | `rings` | 100000 | 2 | float64 | 1.6 MB | train split, recipe skewed-modes |
120
+ | `train/checkerboard_9547623f_skewed-modes.npy` | `checkerboard` | 100000 | 2 | float64 | 1.6 MB | train split, recipe skewed-modes |
121
+ | `train/dw4_d9994289_tempered-mala.npy` | `dw4` | 100000 | 8 | float32 | 3.2 MB | train split, recipe tempered-mala |
122
+ | `train/lj13_bd3bc3a0_tempered-mala.npy` | `lj13` | 100000 | 39 | float32 | 15.6 MB | train split, recipe tempered-mala |
123
+ | `train/lj55_01c56181_tempered-mala.npy` | `lj55` | 100000 | 165 | float32 | 66.0 MB | train split, recipe tempered-mala |
124
+ | `train/seeds_f9a50f20_tempered-mala.npy` | `seeds` | 100000 | 26 | float64 | 20.8 MB | train split, recipe tempered-mala |
125
+ | `train/brownian_45794097_tempered-mala.npy` | `brownian` | 100000 | 32 | float64 | 25.6 MB | train split, recipe tempered-mala |
126
+ | `train/lgcp_cea6d9a6_tempered-mala.npy` | `lgcp` | 100000 | 1600 | float64 | 1280.0 MB | train split, recipe tempered-mala |
127
+ | `train/lgcp-whitened_30e98363_tempered-mala.npy` | `lgcp-whitened` | 100000 | 1600 | float64 | 1280.0 MB | train split, recipe tempered-mala |
128
+ | `train/ka-ternary-N44-T1.0_c0f9b3b8_basin-mc.npy` | `ka-ternary-N44-T1.0` | 100000 | 88 | float32 | 35.2 MB | train split, recipe basin-mc |
129
+ | `train/ka-ternary-N44-T0.32_d50e8a3f_basin-mc.npy` | `ka-ternary-N44-T0.32` | 100000 | 88 | float32 | 35.2 MB | train split, recipe basin-mc |
130
+ | `train/ka-binary-N64-T0.2_e60ecba4_basin-mc.npy` | `ka-binary-N64-T0.2` | 100000 | 128 | float32 | 51.2 MB | train split, recipe basin-mc |
131
+ | `train/ionosphere_d00109c3_tempered-mala.npy` | `ionosphere` | 100000 | 35 | float64 | 28.0 MB | train split, recipe tempered-mala |
132
+ | `train/sonar_52aa10ef_tempered-mala.npy` | `sonar` | 100000 | 61 | float64 | 48.8 MB | train split, recipe tempered-mala |
133
+ | `train/german-credit_3cfdf175_tempered-mala.npy` | `german-credit` | 100000 | 25 | float64 | 20.0 MB | train split, recipe tempered-mala |
134
+ | `train/breast-cancer_543f5f94_tempered-mala.npy` | `breast-cancer` | 100000 | 31 | float64 | 24.8 MB | train split, recipe tempered-mala |
135
+ | `train/ace-a-nme-T300_54968005_basin-md.npy` | `ace-a-nme-T300` | 100000 | 66 | float32 | 26.4 MB | train split, recipe basin-md |
136
+ | `train/ace-aaa-nme-T300_cda31701_basin-md.npy` | `ace-aaa-nme-T300` | 100000 | 126 | float32 | 50.4 MB | train split, recipe basin-md |
137
+ | `train/aaa-T310_e0bfbee3_basin-md.npy` | `aaa-T310` | 100000 | 99 | float32 | 39.6 MB | train split, recipe basin-md |
138
+ | `train/aaaaaa-T310_08d2d916_basin-md.npy` | `aaaaaa-T310` | 100000 | 189 | float32 | 75.6 MB | train split, recipe basin-md |
139
 
140
  Independence is the effective sample size as a fraction of the rows: measured on the stored chains
141
  for the tempered runs and the glass, and Stan's smallest bulk ESS for the posteriors, which exceeds
142
  100% where successive NUTS draws are anticorrelated. The exact draws are independent by
143
+ construction. A train split is biased on purpose, so its row says which recipe made it.
144
 
145
  The rows are interleaved across chains, so the first `n` rows of a file span every chain of the run
146
  that produced it, and `test_samples(n=...)` can read a prefix.
 
157
  | `swapmc/` | swap Monte Carlo on the GPU, 16 384 chains started from equilibrated configurations and stored at a fixed spacing | the merged set is at least 90% independent on the energy and the pair distances, with no drift from its start, and the specific heat agrees between the two halves of the run |
158
  | `stan/` | Stan's NUTS, on models written in samplingdb's own coordinates | Stan's log density equals samplingdb's to 1e-9; R-hat below 1.01, bulk ESS above 90% of the draws, no divergences |
159
  | `exact/` | rejection sampling of the two log scales from their priors against the bounded marginal likelihood, then the locations from their exact Gaussian conditional | the factorised density equals samplingdb's up to a constant, to 1e-8 across 1000 random points; every proposal stays below the bound |
160
+ | `train/` | the target's own `generate_train_samples` at seed 0, 100 000 samples, on a GPU (`gen/train/generate.py`) | samplingdb's tests: every mode of the test split visited in the wrong proportions, and the test energies covered at both ends |
161
 
162
  ## Versions
163
 
 
170
  | --- | --- |
171
  | `v1` | 17 sets |
172
  | `v2` | the Brownian posterior from an exact sampler, under `exact/` in place of `stan/`; both ternary glass sets regenerated on the GPU; the three particle sets, unchanged, under new names, since the particle count joined their `spec_id`; the binary Kob-Andersen glass at T = 0.2, published for the first time; every set under the MIT License, in place of CC BY 4.0 |
173
+ | `v3` | the default train split of every target, under `train/`; the reference sets of `v2`, unchanged |
174
 
175
  ## License and attribution
176