Skip to content

Commit 6d88a59

Browse files
authored
Merge branch 'main' into numpydoc_exponential
2 parents 6bdc274 + d150d55 commit 6d88a59

File tree

83 files changed

+2527
-3436
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+2527
-3436
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ Depending on what your PR does, here are a few things you might want to address
55
+ [ ] what are the (breaking) changes that this PR makes?
66
+ [ ] important background, or details about the implementation
77
+ [ ] are the changes—especially new features—covered by tests and docstrings?
8-
+ [ ] [linting/style checks have been run](https://github.com/pymc-devs/pymc3/wiki/PyMC3-Python-Code-Style)
8+
+ [ ] [linting/style checks have been run](https://docs.pymc.io/en/latest/contributing/python_style.html)
99
+ [ ] [consider adding/updating relevant example notebooks](https://github.com/pymc-devs/pymc-examples)
1010
+ [ ] right before it's ready to merge, mention the PR in the RELEASE-NOTES.md

.github/workflows/nightly.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: nightly
2+
3+
on:
4+
schedule:
5+
- cron: "0 0 * * *"
6+
7+
jobs:
8+
build-and-publish-nightly:
9+
name: Build source distribution
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
with:
14+
fetch-depth: 0
15+
- uses: actions/setup-python@v2
16+
with:
17+
python-version: 3.9
18+
- name: Install dependencies
19+
run: |
20+
python -m pip install -U pip
21+
python -m pip install build
22+
- name: Build the sdist
23+
run: python -m build --sdist .
24+
env:
25+
BUILD_PYMC_NIGHTLY: true
26+
- name: Publish to PyPI
27+
uses: pypa/[email protected]
28+
with:
29+
user: __token__
30+
password: ${{ secrets.PYPI_TOKEN_PYMC_NIGHTLY }}
31+
test-install-job:
32+
needs: build-and-publish-nightly
33+
runs-on: ubuntu-latest
34+
steps:
35+
- name: Set up Python
36+
uses: actions/setup-python@v2
37+
with:
38+
python-version: 3.9
39+
- name: Give PyPI a chance to update the index
40+
run: sleep 240
41+
- name: Install from PyPI
42+
run: |
43+
pip install pymc-nightly==$(grep 'version' pymc/__init__.py | awk '{print $3}' | tr -d '"').dev$(date +"%Y%m%d")

.github/workflows/pytest.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ jobs:
4848
--ignore=pymc/tests/test_step.py
4949
--ignore=pymc/tests/test_tuning.py
5050
--ignore=pymc/tests/test_transforms.py
51-
--ignore=pymc/tests/test_variational_inference.py
5251
--ignore=pymc/tests/test_sampling_jax.py
5352
--ignore=pymc/tests/test_dist_math.py
5453
--ignore=pymc/tests/test_minibatches.py
@@ -64,7 +63,6 @@ jobs:
6463
--ignore=pymc/tests/test_distributions_random.py
6564
--ignore=pymc/tests/test_idata_conversion.py
6665
--ignore=pymc/tests/test_smc.py
67-
--ignore=pymc/tests/test_bart.py
6866
--ignore=pymc/tests/test_missing.py
6967
7068
- |
@@ -78,7 +76,7 @@ jobs:
7876
pymc/tests/test_updates.py
7977
pymc/tests/test_transforms.py
8078
pymc/tests/test_smc.py
81-
pymc/tests/test_bart.py
79+
pymc/tests/test_mixture.py
8280
8381
- |
8482
pymc/tests/test_parallel_sampling.py
@@ -169,6 +167,7 @@ jobs:
169167
pymc/tests/test_distributions_random.py
170168
pymc/tests/test_distributions_moments.py
171169
pymc/tests/test_distributions_timeseries.py
170+
pymc/tests/test_variational_inference.py
172171
- |
173172
pymc/tests/test_parallel_sampling.py
174173
pymc/tests/test_sampling.py

.pre-commit-config.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,35 @@ repos:
6060
entry: from \.[\.\w]* import
6161
types: [python]
6262
language: pygrep
63+
- id: no-internal-links
64+
name: Check no internal links are in the docs
65+
description: >-
66+
'A quick check for the links in the intersphinx '
67+
'mapping inside `docs/source/`'
68+
'See docs/source/conf.py for more information.'
69+
files: ^docs/source/
70+
# Files that should be ignored:
71+
# - index.md
72+
# - 404.md
73+
# - contributing/release_checklist.md
74+
# The other files are under development and should be
75+
# removed from the list once they are revised.
76+
exclude: >
77+
(?x)(index.md|
78+
404.md|
79+
contributing/release_checklist.md|
80+
contributing/developer_guide.rst|
81+
learn/examples.md)
82+
entry: >
83+
(?x)(arviz-devs.github.io|
84+
aesara.readthedocs.io|
85+
aeppl.readthedocs.io|
86+
docs.pymc.io|
87+
numpy.org/doc|
88+
pymc-examples.readthedocs.io|
89+
myst-parser.readthedocs.io|
90+
myst-nb.readthedocs.io|
91+
docs.python.org|
92+
xarray.pydata.org)
93+
language: pygrep
94+
types_or: [markdown, rst, jupyter]

RELEASE-NOTES.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,13 @@ Instead update the vNext section until 4.0.0 is out.
77
⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠⚠
88
-->
99

10-
## PyMC vNext (4.0.0b1 → 4.0.0b2 → 4.0.0b3 → 4.0.0)
10+
## PyMC vNext (4.0.0b1 → 4.0.0b2 → 4.0.0b3 → 4.0.0b4 → 4.0.0)
1111
⚠ The changes below are the delta between the upcoming releases `v3.11.5` →...→ `v4.0.0`.
1212

13-
### No-yet working features
13+
### Not-yet working features
1414
We plan to get these working again, but at this point their inner workings have not been refactored.
1515
- Timeseries distributions (see [#4642](https://github.com/pymc-devs/pymc/issues/4642))
16-
- Mixture distributions (see [#4781](https://github.com/pymc-devs/pymc/issues/4781))
17-
- Cholesky distributions (see WIP PR [#4784](https://github.com/pymc-devs/pymc/pull/4784))
18-
- Variational inference submodule (see WIP PR [#4582](https://github.com/pymc-devs/pymc/pull/4582))
16+
- Nested Mixture distributions (see [#5533](https://github.com/pymc-devs/pymc/issues/5533))
1917
- Elliptical slice sampling (see [#5137](https://github.com/pymc-devs/pymc/issues/5137))
2018
- `BaseStochasticGradient` (see [#5138](https://github.com/pymc-devs/pymc/issues/5138))
2119
- `pm.sample_posterior_predictive_w` (see [#4807](https://github.com/pymc-devs/pymc/issues/4807))
@@ -74,6 +72,7 @@ All of the above apply to:
7472
- In the gp.utils file, the `kmeans_inducing_points` function now passes through `kmeans_kwargs` to scipy's k-means function.
7573
- The function `replace_with_values` function has been added to `gp.utils`.
7674
- `MarginalSparse` has been renamed `MarginalApprox`.
75+
- Removed `MixtureSameFamily`. `Mixture` is now capable of handling batched multivariate components (see [#5438](https://github.com/pymc-devs/pymc/pull/5438)).
7776
- ...
7877

7978
### Expected breaks
@@ -129,6 +128,7 @@ This includes API changes we did not warn about since at least `3.11.0` (2021-01
129128
- `softmax` and `log_softmax` functions added to `math` module (see [#5279](https://github.com/pymc-devs/pymc/pull/5279)).
130129
- ...
131130

131+
132132
## Documentation
133133
- Switched to the [pydata-sphinx-theme](https://pydata-sphinx-theme.readthedocs.io/en/latest/)
134134
- Updated our documentation tooling to use [MyST](https://myst-parser.readthedocs.io/en/latest/), [MyST-NB](https://myst-nb.readthedocs.io/en/latest/), sphinx-design, notfound.extension,

conda-envs/environment-dev-py37.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ channels:
55
- defaults
66
dependencies:
77
- aeppl=0.0.26
8-
- aesara=2.3.8
8+
- aesara=2.4.0
99
- arviz>=0.11.4
1010
- blas
1111
- cachetools>=4.2.1
@@ -24,7 +24,7 @@ dependencies:
2424
- pytest>=3.0
2525
- python-graphviz
2626
- python=3.7
27-
- scipy>=1.4.1,<1.8.0
27+
- scipy>=1.4.1
2828
- sphinx-copybutton
2929
- sphinx-notfound-page
3030
- sphinx>=1.5

conda-envs/environment-dev-py38.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ channels:
55
- defaults
66
dependencies:
77
- aeppl=0.0.26
8-
- aesara=2.3.8
8+
- aesara=2.4.0
99
- arviz>=0.11.4
1010
- blas
1111
- cachetools>=4.2.1
@@ -24,7 +24,7 @@ dependencies:
2424
- pytest>=3.0
2525
- python-graphviz
2626
- python=3.8
27-
- scipy>=1.4.1,<1.8.0
27+
- scipy>=1.4.1
2828
- sphinx-copybutton
2929
- sphinx-notfound-page
3030
- sphinx>=1.5

conda-envs/environment-dev-py39.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ channels:
55
- defaults
66
dependencies:
77
- aeppl=0.0.26
8-
- aesara=2.3.8
8+
- aesara=2.4.0
99
- arviz>=0.11.4
1010
- blas
1111
- cachetools>=4.2.1
@@ -24,7 +24,7 @@ dependencies:
2424
- pytest>=3.0
2525
- python-graphviz
2626
- python=3.9
27-
- scipy>=1.4.1,<1.8.0
27+
- scipy>=1.4.1
2828
- sphinx-copybutton
2929
- sphinx-notfound-page
3030
- sphinx>=1.5

conda-envs/environment-test-py37.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ channels:
55
- defaults
66
dependencies:
77
- aeppl=0.0.26
8-
- aesara=2.3.8
8+
- aesara=2.4.0
99
- arviz>=0.11.4
1010
- blas
1111
- cachetools>=4.2.1
@@ -22,5 +22,5 @@ dependencies:
2222
- pytest>=3.0
2323
- python-graphviz
2424
- python=3.7
25-
- scipy>=1.4.1,<1.8.0
25+
- scipy>=1.4.1
2626
- typing-extensions>=3.7.4

conda-envs/environment-test-py38.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ channels:
55
- defaults
66
dependencies:
77
- aeppl=0.0.26
8-
- aesara=2.3.8
8+
- aesara=2.4.0
99
- arviz>=0.11.4
1010
- blas
1111
- cachetools>=4.2.1
@@ -22,5 +22,5 @@ dependencies:
2222
- pytest>=3.0
2323
- python-graphviz
2424
- python=3.8
25-
- scipy>=1.4.1,<1.8.0
25+
- scipy>=1.4.1
2626
- typing-extensions>=3.7.4

conda-envs/environment-test-py39.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ channels:
55
- defaults
66
dependencies:
77
- aeppl=0.0.26
8-
- aesara=2.3.8
8+
- aesara=2.4.0
99
- arviz>=0.11.4
1010
- blas
1111
- cachetools>=4.2.1
@@ -22,5 +22,5 @@ dependencies:
2222
- pytest>=3.0
2323
- python-graphviz
2424
- python=3.9
25-
- scipy>=1.4.1,<1.8.0
25+
- scipy>=1.4.1
2626
- typing-extensions>=3.7.4

conda-envs/windows-environment-dev-py38.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ channels:
55
dependencies:
66
# base dependencies (see install guide for Windows)
77
- aeppl=0.0.26
8-
- aesara=2.3.8
8+
- aesara=2.4.0
99
- arviz>=0.11.4
1010
- blas
1111
- cachetools>=4.2.1
@@ -17,7 +17,7 @@ dependencies:
1717
- pip
1818
- python=3.8
1919
- python-graphviz
20-
- scipy>=1.4.1,<1.8.0
20+
- scipy>=1.4.1
2121
- typing-extensions>=3.7.4
2222
# Extra stuff for dev, testing and docs build
2323
- ipython>=7.16

conda-envs/windows-environment-test-py38.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ channels:
55
dependencies:
66
# base dependencies (see install guide for Windows)
77
- aeppl=0.0.26
8-
- aesara=2.3.8
8+
- aesara=2.4.0
99
- arviz>=0.11.4
1010
- blas
1111
- cachetools>=4.2.1
@@ -21,7 +21,7 @@ dependencies:
2121
- pip
2222
- python=3.8
2323
- python-graphviz
24-
- scipy>=1.4.1,<1.8.0
24+
- scipy>=1.4.1
2525
- typing-extensions>=3.7.4
2626
# Extra stuff for testing
2727
- ipython>=7.16

docs/source/Advanced_usage_of_Aesara_in_PyMC.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ Good reasons for defining a custom `Op` might be the following:
102102
and sufficiently parallelizable to make the cost worth it.
103103
We would definitely like to hear about any such examples.
104104

105-
Aesara has extensive `documentation, <https://aesara.readthedocs.io/en/latest/extending/index.html>`_
105+
Aesara has extensive :doc:`documentation <aesara:index>`
106106
about how to write new Ops.
107107

108108

docs/source/PyMC_and_Aesara.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ their posterior probability density up to a constant factor. We then use
1717
symbolic manipulations of this function to also get access to its gradient.
1818

1919
For a thorough introduction to Aesara see the
20-
`aesara docs <https://aesara.readthedocs.io/en/latest/>`_,
20+
:doc:`aesara docs <aesara:index>`,
2121
but for the most part you don't need detailed knowledge about it as long
2222
as you are not trying to define new distributions or other extensions
2323
of PyMC. But let's look at a simple example to get a rough
@@ -81,7 +81,7 @@ like NumPy arrays. Most NumPy functions are available in `aesara.tensor`
8181
can be found in `at.nlinalg` and `at.slinalg` (the NumPy and SciPy
8282
operations respectively). Some support for sparse matrices is available
8383
in `aesara.sparse`. For a detailed overview of available operations,
84-
see `the aesara api docs <https://aesara.readthedocs.io/en/latest/library/tensor/index.html>`_.
84+
see :mod:`the aesara api docs <aesara.tensor>`.
8585

8686
A notable exception where Aesara variables do *not* behave like
8787
NumPy arrays are operations involving conditional execution.

docs/source/api.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ API Reference
1515
api/smc
1616
api/backends
1717
api/data
18-
api/bart
1918
api/ode
2019
api/tuning
2120
api/math

docs/source/api/bart.rst

Lines changed: 0 additions & 12 deletions
This file was deleted.

docs/source/api/distributions.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.. _api_distributions:
12
*************
23
Distributions
34
*************

docs/source/api/distributions/mixture.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,3 @@ Mixture
88

99
Mixture
1010
NormalMixture
11-
MixtureSameFamily

docs/source/conf.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
"notfound.extension",
5050
"sphinx_copybutton",
5151
"sphinx_remove_toctrees",
52+
"jupyter_sphinx",
5253
]
5354

5455
# Don't auto-generate summary for class members.
@@ -74,8 +75,10 @@
7475
"MultiTrace": ":class:`~pymc.backends.base.MultiTrace`",
7576
"BaseTrace": ":class:`~pymc.backends.base.BaseTrace`",
7677
"Point": ":class:`~pymc.Point`",
78+
"Model": ":class:`~pymc.Model`",
7779
"SMC_kernel": ":ref:`SMC Kernel <smc_kernels>`",
7880
"Aesara_Op": ":class:`Aesara Op <aesara.graph.op.Op>`",
81+
"tensor_like": ":term:`tensor_like`",
7982
}
8083

8184
# Show the documentation of __init__ and the class docstring

docs/source/contributing/build_docs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ To build the docs, run these commands at pymc repository root:
66
$ pip install -r requirements-dev.txt # Make sure the dev requirements are installed
77
$ make clean # clean built docs from previous runs and intermediate outputs
88
$ make html # Build docs
9-
$ python -m http.server --directory ../_build/ # Render docs
9+
$ python -m http.server --directory docs/_build/ # Render docs
1010
```
1111

1212
Check the printed url where docs are being served and open it.

0 commit comments

Comments
 (0)