Skip to content

Commit dc9ff24

Browse files
ColCarrollThe bayeux Authors
authored and
The bayeux Authors
committed
Fix README links by separating README from docs index.
Fixes #60, closes #57 PiperOrigin-RevId: 696187805
1 parent a47b638 commit dc9ff24

File tree

2 files changed

+48
-5
lines changed

2 files changed

+48
-5
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ surrogate_posterior, loss = normal_density.vi.tfp_factored_surrogate_posterior(s
3535

3636
## Read more
3737

38-
* [Defining models](inference)
39-
* [Inspecting models](inspecting)
40-
* [Testing and debugging](debug_mode)
41-
* Also see `bayeux` integration with [numpyro](examples/numpyro_and_bayeux), [PyMC](examples/pymc_and_bayeux), and [TFP](examples/tfp_and_bayeux)!
38+
* [Defining models](docs/inference.md)
39+
* [Inspecting models](docs/inspecting.md)
40+
* [Testing and debugging](docs/debug_mode.md)
41+
* Also see `bayeux` integration with [numpyro](docs/examples/numpyro_and_bayeux.ipynb), [PyMC](docs/examples/pymc_and_bayeux.ipynb), and [TFP](docs/examples/tfp_and_bayeux.ipynb)!
4242

4343

4444
*This is not an officially supported Google product.*

docs/index.md

+44-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,44 @@
1-
--8<-- "README.md"
1+
# Bayeux
2+
3+
*Stitching together models and samplers*
4+
5+
[![Unittests](https://github.com/jax-ml/bayeux/actions/workflows/pytest_and_autopublish.yml/badge.svg)](https://github.com/jax-ml/bayeux/actions/workflows/pytest_and_autopublish.yml)
6+
[![PyPI version](https://badge.fury.io/py/bayeux_ml.svg)](https://badge.fury.io/py/bayeux_ml)
7+
8+
`bayeux` lets you write a probabilistic model in JAX and immediately have access to state-of-the-art inference methods. The API aims to be **simple**, **self descriptive**, and **helpful**. Simply provide a log density function (which doesn't even have to be normalized), along with a single point (specified as a [pytree](https://jax.readthedocs.io/en/latest/pytrees.html)) where that log density is finite. Then let `bayeux` do the rest!
9+
10+
## Installation
11+
12+
```bash
13+
pip install bayeux-ml
14+
```
15+
## Quickstart
16+
17+
We define a model by providing a log density in JAX. This could be defined using a probabilistic programming language (PPL) like [numpyro](examples/numpyro_and_bayeux), [PyMC](examples/pymc_and_bayeux), [TFP](examples/tfp_and_bayeux), distrax, oryx, coix, or directly in JAX.
18+
19+
```python
20+
import bayeux as bx
21+
import jax
22+
23+
normal_density = bx.Model(
24+
log_density=lambda x: -x*x,
25+
test_point=1.)
26+
27+
seed = jax.random.key(0)
28+
29+
opt_results = normal_density.optimize.optax_adam(seed=seed)
30+
# OR!
31+
idata = normal_density.mcmc.numpyro_nuts(seed=seed)
32+
# OR!
33+
surrogate_posterior, loss = normal_density.vi.tfp_factored_surrogate_posterior(seed=seed)
34+
```
35+
36+
## Read more
37+
38+
* [Defining models](inference)
39+
* [Inspecting models](inspecting)
40+
* [Testing and debugging](debug_mode)
41+
* Also see `bayeux` integration with [numpyro](examples/numpyro_and_bayeux), [PyMC](examples/pymc_and_bayeux), and [TFP](examples/tfp_and_bayeux)!
42+
43+
44+
*This is not an officially supported Google product.*

0 commit comments

Comments
 (0)