Commit 965f154
Fix sample_all_priors to not sample one value for all lengthscales (#2404)
Summary:
Pull Request resolved: #2404
#2371 added support for `sample_all_priors` to handle multivariate priors, but these changes resulted in sampling the same value for all entries of a multi-dimensional hyperparameter if a univariate prior is used. In particular, this means that `sample_all_priors` will sample exactly the same lengthscale for all dimensions when using a univariate prior.
This diff changes this behavior to instead sample according to the shape of the closure when a univariate prior is specified. This results in sampling different lengthscales for each dimension and batch dimension.
Reviewed By: saitcakmak
Differential Revision: D58855726
fbshipit-source-id: 5c70ba83ff1710fe678c60f0ed2f11f57e671ad51 parent bf529df commit 965f154
File tree
2 files changed
+36
-8
lines changed- botorch/optim/utils
- test/optim/utils
2 files changed
+36
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | | - | |
167 | 166 | | |
168 | | - | |
169 | | - | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
170 | 176 | | |
171 | 177 | | |
172 | 178 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
246 | 247 | | |
247 | 248 | | |
248 | 249 | | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
249 | 270 | | |
250 | 271 | | |
| 272 | + | |
251 | 273 | | |
252 | 274 | | |
253 | | - | |
254 | | - | |
| 275 | + | |
| 276 | + | |
255 | 277 | | |
256 | 278 | | |
257 | 279 | | |
258 | 280 | | |
259 | 281 | | |
260 | | - | |
261 | | - | |
| 282 | + | |
| 283 | + | |
262 | 284 | | |
263 | 285 | | |
264 | 286 | | |
| |||
267 | 289 | | |
268 | 290 | | |
269 | 291 | | |
270 | | - | |
| 292 | + | |
0 commit comments