Skip to content

Commit 081f2f9

Browse files
authored
Change "pymcx" to "pymc-experimental" in the pathfinder.ipynb notebook (#521)
* nb: pathfinder; pymc-experimental * nb: pathfinder; add myst file * nb pathfinder; rm unneeded pytensor imports * add myst file
1 parent 9cbb346 commit 081f2f9

File tree

2 files changed

+53
-30
lines changed

2 files changed

+53
-30
lines changed

examples/variational_inference/pathfinder.ipynb

+40-22
Large diffs are not rendered by default.

examples/variational_inference/pathfinder.myst.md

+13-8
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ jupytext:
55
format_name: myst
66
format_version: 0.13
77
kernelspec:
8-
display_name: pymc4
8+
display_name: Python 3 (ipykernel)
99
language: python
10-
name: pymc4
10+
name: python3
1111
---
1212

1313
(pathfinder)=
1414

1515
# Pathfinder Variational Inference
1616

17-
:::{post} Sept 30, 2022
17+
:::{post} Feb 5, 2023
1818
:tags: variational inference, jax
1919
:category: advanced, how-to
2020
:author: Thomas Wiecki
@@ -26,17 +26,21 @@ Pathfinder {cite:p}`zhang2021pathfinder` is a variational inference algorithm th
2626

2727
This algorithm is [implemented](https://github.com/blackjax-devs/blackjax/pull/194) in [BlackJAX](https://github.com/blackjax-devs/blackjax), a library of inference algorithms for [JAX](https://github.com/google/jax). Through PyMC's JAX-backend (through [pytensor](https://github.com/pytensor-devs/pytensor)) we can run BlackJAX's pathfinder on any PyMC model with some simple wrapper code.
2828

29-
This wrapper code is implemented in [pymcx](https://github.com/pymc-devs/pymcx/). This tutorial shows how to run Pathfinder on your PyMC model.
29+
This wrapper code is implemented in [pymc-experimental](https://github.com/pymc-devs/pymc-experimental/). This tutorial shows how to run Pathfinder on your PyMC model.
3030

31-
You first need to install `pymcx`:
31+
You first need to install `pymc-experimental`:
3232

33-
`pip install git+https://github.com/pymc-devs/pymcx`
33+
`pip install git+https://github.com/pymc-devs/pymc-experimental`
34+
35+
Instructions for installing other packages:
36+
- [jax](https://github.com/google/jax#installation)
37+
- [blackjax](https://pypi.org/project/blackjax/)
3438

3539
```{code-cell} ipython3
3640
import arviz as az
3741
import numpy as np
3842
import pymc as pm
39-
import pymcx as pmx
43+
import pymc_experimental as pmx
4044
4145
print(f"Running on PyMC v{pm.__version__}")
4246
```
@@ -82,14 +86,15 @@ az.plot_trace(idata);
8286
## Authors
8387

8488
* Authored by Thomas Wiecki on Oct 11 2022 ([pymc-examples#429](https://github.com/pymc-devs/pymc-examples/pull/429))
89+
* Re-execute notebook, by Reshama Shaikh on Feb 5, 2023
8590

8691
+++
8792

8893
## Watermark
8994

9095
```{code-cell} ipython3
9196
%load_ext watermark
92-
%watermark -n -u -v -iv -w -p pytensor,xarray
97+
%watermark -n -u -v -iv -w -p xarray
9398
```
9499

95100
:::{include} ../page_footer.md

0 commit comments

Comments
 (0)