Skip to content

Commit

Permalink
Merge branch 'v3' into v3
Browse files Browse the repository at this point in the history
  • Loading branch information
aloctavodia authored May 30, 2024
2 parents f102009 + ed74406 commit 4500938
Show file tree
Hide file tree
Showing 48 changed files with 601 additions and 164 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
floatx: [float32, float64]
test-subset:
- |
--ignore=pymc3/tests/test_backports.py
--ignore=pymc3/tests/test_dist_math.py
--ignore=pymc3/tests/test_distribution_defaults.py
--ignore=pymc3/tests/test_distributions.py
Expand Down Expand Up @@ -42,6 +43,7 @@ jobs:
pymc3/tests/test_shared.py
pymc3/tests/test_smc.py
- |
pymc3/tests/test_backports.py
pymc3/tests/test_examples.py
pymc3/tests/test_mixture.py
pymc3/tests/test_ode.py
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
release-job:
runs-on: ubuntu-latest
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN_PYMC3 }}
steps:
- uses: actions/checkout@v2
- name: Set up Python
Expand Down
27 changes: 13 additions & 14 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
exclude: ^(docs/logos|pymc3/tests/data)/
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
rev: v4.0.1
hooks:
- id: check-merge-conflict
- id: check-toml
Expand All @@ -14,44 +14,43 @@ repos:
exclude: ^requirements-dev\.txt$
- id: trailing-whitespace
- repo: https://github.com/PyCQA/isort
rev: 5.7.0
rev: 5.10.1
hooks:
- id: isort
name: isort
- repo: https://github.com/asottile/pyupgrade
rev: v2.10.0
rev: v2.29.1
hooks:
- id: pyupgrade
args: [--py37-plus]
- repo: https://github.com/psf/black
rev: 20.8b1
rev: 21.12b0
hooks:
- id: black
- repo: https://github.com/PyCQA/pylint
rev: pylint-2.6.0
rev: v2.12.2
hooks:
- id: pylint
args: [--rcfile=.pylintrc]
files: ^pymc3/
files: ^pymc/
- repo: https://github.com/MarcoGorelli/madforhooks
rev: 0.2.1
hooks:
- id: conda-env-sorter
files: ^conda-envs/environment-dev-py.+\.yml$
- repo: local
hooks:
- id: check-no-tests-are-ignored
additional_dependencies: [pandas,pyyaml]
entry: python scripts/check_all_tests_are_covered.py
files: ^\.github/workflows/pytest\.yml$
language: python
name: Check no tests are ignored
pass_filenames: false
- id: conda-env-sort
additional_dependencies: [pyyaml]
entry: python scripts/sort_conda_envs.py
files: ^conda-envs/environment-dev-py37\.yml$
language: python
name: Sort dependencies in conda envs
types: [yaml]
- id: pip-from-conda
additional_dependencies: [pyyaml]
entry: python scripts/generate_pip_deps_from_conda.py
files: ^conda-envs/
files: ^conda-envs/environment-dev-py.+.yml$
language: python
name: Generate pip dependency from conda
- id: no-relative-imports
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. image:: https://cdn.rawgit.com/pymc-devs/pymc3/master/docs/logos/svg/PyMC3_banner.svg
.. image:: https://cdn.rawgit.com/pymc-devs/pymc/v3/docs/logos/svg/PyMC3_banner.svg
:height: 100px
:alt: PyMC3 logo
:align: center
Expand Down
36 changes: 29 additions & 7 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,42 @@
# Release Notes

## PyMC3 3.11.3 (TBD)
## PyMC 3.11.5 (14 March 2022)
### Backports
+ The `pm.logp(rv, x)` syntax is now available and recommended to make your model code `v4`-ready. Note that this backport is just an alias and much less capable than what's available with `pymc >=4` (see [#5083](https://github.com/pymc-devs/pymc/pulls/5083)).
+ The `pm.Distribution(testval=...)` kwarg was deprecated and will be replaced by `pm.Distribution(initval=...)`in `pymc >=4` (see [#5226](https://github.com/pymc-devs/pymc/pulls/5226)).
+ The `pm.sample(start=...)` kwarg was deprecated and will be replaced by `pm.sample(initvals=...)`in `pymc >=4` (see [#5226](https://github.com/pymc-devs/pymc/pulls/5226)).
+ `pm.Lognormal` is now available as an alias for `pm.Lognormal` (see [#5389](https://github.com/pymc-devs/pymc/pull/5389)).

### Bugfixes
+ The upper limit for the SciPy version is `<1.8.0` and will most probably remain for all future `3.x.x` releases. For compatibility with newer SciPy versions please update to `pymc>=4.0.0`. Also see [#5448](https://github.com/pymc-devs/pymc/pull/5448).
+ A hotfix is applied on import to remain compatible with NumPy 1.22 (see [#5316](https://github.com/pymc-devs/pymc/pull/5316)).

## PyMC3 3.11.4 (20 August 2021)

### New Features
+ Generalized BART, bounded distributions like Binomial and Poisson can now be used as likelihoods (see [#4675](https://github.com/pymc-devs/pymc3/pull/4675), [#4709](https://github.com/pymc-devs/pymc3/pull/4709) and
[#4720](https://github.com/pymc-devs/pymc3/pull/4720)).
+ `plot_gp_dist` is now available at the package level: `pm.plot_gp_dist` ([see #4835](https://github.com/pymc-devs/pymc3/pull/4835)).
+ The experimental JAX sampling was removed. It will be included in the upcoming `v4` release ([see #4866](https://github.com/pymc-devs/pymc3/pull/4866)).
+ `pm.intX` no longer downcasts integers unnecessarily (see [#4569](https://github.com/pymc-devs/pymc3/pull/4569))

### Maintenance
+ A deprecation warning from the `semver` package we use for checking backend compatibility was dealt with (see [#4547](https://github.com/pymc-devs/pymc3/pull/4547)).
+ `theano.printing.pydotprint` is now hotfixed upon import (see [#4594](https://github.com/pymc-devs/pymc3/pull/4594)).
+ Fix bug in the computation of the log pseudolikelihood values (SMC-ABC). (see [#4672](https://github.com/pymc-devs/pymc3/pull/4672)).
+ Fix `LKJCorr.random` method to work with `pm.sample_prior_predictive`. (see [#4780](https://github.com/pymc-devs/pymc3/pull/4780)).
+ Enable documentation generation via ReadTheDocs for upcoming v3 releases. (see [#4805](https://github.com/pymc-devs/pymc3/pull/4805)).
+ Remove `float128` dtype support (see [#4834](https://github.com/pymc-devs/pymc3/pull/4834)).
+ Use `to_tuple` function in `pm.fast_sample_posterior_predictive` to pass shape assertions (see [#4927](https://github.com/pymc-devs/pymc3/pull/4927)).

### New Features
+ Generalized BART, bounded distributions like Binomial and Poisson can now be used as likelihoods (see [#4675](https://github.com/pymc-devs/pymc3/pull/4675), [#4709](https://github.com/pymc-devs/pymc3/pull/4709) and
[#4720](https://github.com/pymc-devs/pymc3/pull/4720)).
+ `plot_gp_dist` is now available at the package level: `pm.plot_gp_dist` ([see #4835](https://github.com/pymc-devs/pymc3/pull/4835)).
+ The experimental JAX sampling was removed. It will be included in the upcoming `v4` release ([see #4866](https://github.com/pymc-devs/pymc3/pull/4866)).
**Release manager** for 3.11.4: Ravin Kumar ([@canyon289](https://github.com/canyon289))

## PyMC3 3.11.3 (19 August 2021)

### Maintenance
* Broken release. Refer to 3.11.4

**Release manager** for 3.11.3: Ravin Kumar ([@canyon289](https://github.com/canyon289))

## PyMC3 3.11.2 (14 March 2021)

Expand All @@ -34,7 +57,6 @@
- `pm.make_shared_replacements` now retains broadcasting information which fixes issues with Metropolis samplers (see [#4492](https://github.com/pymc-devs/pymc3/pull/4492)).

**Release manager** for 3.11.2: Michael Osthege ([@michaelosthege](https://github.com/michaelosthege))
- `pm.intX` no longer downcasts integers unnecessarily (see [#4569](https://github.com/pymc-devs/pymc3/pull/4569))

## PyMC3 3.11.1 (12 February 2021)

Expand Down
10 changes: 6 additions & 4 deletions conda-envs/environment-dev-py37.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,18 @@ dependencies:
- libblas=*=*mkl
- mkl-service
- nbsphinx>=0.4
- numpy=1.15
- numpydoc>=0.9
- pandas=0.24
- numpy>=1.15,<1.22.2
- numpydoc<1.2
- pip
- pre-commit>=2.8.0
- pytest-cov>=2.5
- pytest>=3.0
- python-graphviz
- python=3.7
- recommonmark>=0.4
- scipy=1.2
- scipy>=1.4.1,<1.8.0
- sphinx-autobuild>=0.7
- sphinx>=1.5
- watermark
- pip:
- deprecat
7 changes: 6 additions & 1 deletion conda-envs/environment-dev-py38.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,18 @@ dependencies:
- libblas=*=*mkl
- mkl-service
- nbsphinx>=0.4
- numpydoc>=0.9
- numpy>=1.15,<1.22.2
- numpydoc<1.2
- pip
- pre-commit>=2.8.0
- pytest-cov>=2.5
- pytest>=3.0
- python-graphviz
- python=3.8
- recommonmark>=0.4
- scipy>=1.4.1,<1.8.0
- sphinx-autobuild>=0.7
- sphinx>=1.5
- watermark
- pip:
- deprecat
7 changes: 6 additions & 1 deletion conda-envs/environment-dev-py39.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,18 @@ dependencies:
- libblas=*=*mkl
- mkl-service
- nbsphinx>=0.4
- numpydoc>=0.9
- numpy>=1.15,<1.22.2
- numpydoc<1.2
- pip
- pre-commit>=2.8.0
- pytest-cov>=2.5
- pytest>=3.0
- python-graphviz
- python=3.9
- recommonmark>=0.4
- scipy>=1.4.1,<1.8.0
- sphinx-autobuild>=0.7
- sphinx>=1.5
- watermark
- pip:
- deprecat
6 changes: 5 additions & 1 deletion conda-envs/windows-environment-dev-py38.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,15 @@ dependencies:
# Extra stuff for dev, testing and docs build
- ipython>=7.16
- nbsphinx>=0.4
- numpydoc>=0.9
- numpy>=1.15,<1.22.2
- numpydoc<1.2
- pre-commit>=2.8.0
- pytest-cov>=2.5
- pytest>=3.0
- recommonmark>=0.4
- scipy>=1.4.1,<1.8.0
- sphinx-autobuild>=0.7
- sphinx>=1.5
- watermark
- pip:
- deprecat
8 changes: 5 additions & 3 deletions docs/source/PyMC3_and_Theano.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ arbitrarily chosen) function
First, we need to define symbolic variables for our inputs (this
is similar to eg SymPy's `Symbol`)::

import pymc as pm
import numpy
import theano
import theano.tensor as tt
# We don't specify the dtype of our input variables, so it
Expand Down Expand Up @@ -75,7 +77,7 @@ We can call this function with actual arrays as many times as we want::

a_val = 1.2
x_vals = np.random.randn(10)
y_vals = np.random.randn(10)
y_vals = np.int32(np.random.randn(10))

out = func(a_val, x_vals, y_vals)

Expand Down Expand Up @@ -167,8 +169,8 @@ we generate a Theano variable. And for each variable (observed or otherwise)
we add a term to the global logp. In the background something similar to
this is happening::

# For illustration only, those functions don't actually exist
# in exactly this way!
# For illustration only, these functions don't exactly
# work this way!
model = pm.Model()

mu = tt.scalar('mu')
Expand Down
127 changes: 127 additions & 0 deletions docs/source/_static/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,130 @@
margin: 0.5em;
content: ":";
}

:root {
--pst-color-primary: 19, 6, 84;
--pst-color-success: 40, 167, 69;
--pst-color-info: 0, 123, 255; /*23, 162, 184;*/
--pst-color-warning: 255, 193, 7;
--pst-color-danger: 220, 53, 69;
--pst-color-text-base: 51, 51, 51;

--pst-color-admonition-default: var(--pst-color-info);
--pst-color-admonition-note: var(--pst-color-info);
--pst-color-admonition-attention: var(--pst-color-warning);
--pst-color-admonition-caution: var(--pst-color-warning);
--pst-color-admonition-warning: var(--pst-color-warning);
--pst-color-admonition-danger: var(--pst-color-danger);
--pst-color-admonition-error: var(--pst-color-danger);
--pst-color-admonition-hint: var(--pst-color-success);
--pst-color-admonition-tip: var(--pst-color-success);
--pst-color-admonition-important: var(--pst-color-success);
}

.admonition,
div.admonition {
margin:1.5625em auto;
padding:0 .6rem .8rem;
overflow:hidden;
page-break-inside:avoid;
border-left:.2rem solid;
border-left-color:rgba(var(--pst-color-admonition-default),1);
border-bottom-color:rgba(var(--pst-color-admonition-default),1);
border-right-color:rgba(var(--pst-color-admonition-default),1);
border-top-color:rgba(var(--pst-color-admonition-default),1);
border-radius:.2rem;
box-shadow:0 .2rem .5rem rgba(0,0,0,.05),0 0 .0625rem rgba(0,0,0,.1);
transition:color .25s,background-color .25s,border-color .25s
}
.admonition :last-child,
div.admonition :last-child {
margin-bottom:0
}
.admonition p.admonition-title~*,
div.admonition p.admonition-title~* {
padding:0 1.4rem
}
.admonition>ol,
.admonition>ul,
div.admonition>ol,
div.admonition>ul {
margin-left:1em
}
.admonition>.admonition-title,
div.admonition>.admonition-title {
position:relative;
margin:0 -.6rem;
padding:.4rem .6rem .4rem 2rem;
font-weight:700;
background-color:rgba(var(--pst-color-admonition-default),.1)
}
.admonition>.admonition-title+*,
div.admonition>.admonition-title+* {
margin-top:.4em
}
.admonition.attention,
div.admonition.attention {
border-color:rgba(var(--pst-color-admonition-attention),1)
}
.admonition.attention>.admonition-title,
div.admonition.attention>.admonition-title {
background-color:rgba(var(--pst-color-admonition-attention),.1)
}
.admonition.caution,
div.admonition.caution {
border-color:rgba(var(--pst-color-admonition-caution),1)
}
.admonition.caution>.admonition-title,
div.admonition.caution>.admonition-title {
background-color:rgba(var(--pst-color-admonition-caution),.1)
}
div.admonition.warning {
border-color:rgba(var(--pst-color-admonition-warning),1)
}
.admonition.warning>.admonition-title,
div.admonition.warning>.admonition-title {
background-color:rgba(var(--pst-color-admonition-warning),.1)
}
div.admonition.danger {
border-color:rgba(var(--pst-color-admonition-danger),1)
}
.admonition.danger>.admonition-title,
div.admonition.danger>.admonition-title {
background-color:rgba(var(--pst-color-admonition-danger),.1)
}
div.admonition.error {
border-color:rgba(var(--pst-color-admonition-error),1)
}
.admonition.error>.admonition-title,
div.admonition.error>.admonition-title {
background-color:rgba(var(--pst-color-admonition-error),.1)
}
div.admonition.hint {
border-color:rgba(var(--pst-color-admonition-hint),1)
}
.admonition.hint>.admonition-title,
div.admonition.hint>.admonition-title {
background-color:rgba(var(--pst-color-admonition-hint),.1)
}
div.admonition.tip {
border-color:rgba(var(--pst-color-admonition-tip),1)
}
.admonition.tip>.admonition-title,
div.admonition.tip>.admonition-title {
background-color:rgba(var(--pst-color-admonition-tip),.1)
}
div.admonition.important {
border-color:rgba(var(--pst-color-admonition-important),1)
}
.admonition.important>.admonition-title,
div.admonition.important>.admonition-title {
background-color:rgba(var(--pst-color-admonition-important),.1)
}
div.admonition.note {
border-color:rgba(var(--pst-color-admonition-note),1)
}
.admonition.note>.admonition-title,
div.admonition.note>.admonition-title {
background-color:rgba(var(--pst-color-admonition-note),.1)
}
Loading

0 comments on commit 4500938

Please sign in to comment.