Commit b9aac36
Make fully Bayesian imports lazy (facebook#5148)
Summary:
X-link: meta-pytorch/botorch#3265
`import botorch` eagerly loaded Pyro via two import paths:
1. `botorch.fit` → `from pyro.infer.mcmc import MCMC, NUTS`
2. `botorch.models.__init__` → `fully_bayesian.py` → Pyro imports
This diff makes fully Bayesian imports lazy so that `import botorch` no longer
eagerly loads Pyro. The imports are deferred until `fit_fully_bayesian_model_nuts`
is called or `SaasFullyBayesianSingleTaskGP`/`SaasFullyBayesianMultiTaskGP` are
accessed from `botorch.models`.
Reviewed By: saitcakmak
Differential Revision: D996870471 parent 3712dd6 commit b9aac36
2 files changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
| 56 | + | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
0 commit comments