Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
b57cabe
⬆️ UPGRADE: Autoupdate pre-commit config
Mar 6, 2023
534a9ae
Exclude tests from package discovery (#6552)
Armavica Mar 7, 2023
e76bba9
Fix bug in transform_scan_values
ricardoV94 Mar 7, 2023
49aacf4
Allow Scan logprob inference of non-pure RandomVariable outputs
ricardoV94 Mar 8, 2023
a41d524
Bring back testing utilities used in downstream packages
ricardoV94 Mar 7, 2023
047141c
Gitpod instructions (#6549)
reshamas Mar 9, 2023
cf6d4ce
Allow passing dims to Potential and Deterministic (#6576)
Raj-Parekh24 Mar 10, 2023
4965292
Skip test_polyagamma_moment if library is not installed
ricardoV94 Mar 9, 2023
5603792
Add explicit support for Python 3.11
ricardoV94 Mar 9, 2023
fc51fd3
Fix typos in Potential docstring
Mar 7, 2023
5392336
fix typo
aleicazatti Mar 9, 2023
b6521f2
Add Mistplay sponsor (#6570)
Raj-Parekh24 Mar 11, 2023
ff8a4c7
Fix `warn_treedepth` looking at the wrong stat (#6591)
michaelosthege Mar 12, 2023
da68d11
Add nuts_sampler_kwargs and nuts_kwargs to pm.sample (#6581)
fonnesbeck Mar 12, 2023
457421b
Fix trailing whitespace.
twiecki Mar 13, 2023
312bde4
⬆️ UPGRADE: Autoupdate pre-commit config
Mar 13, 2023
f63268f
Do not test invalid parameter combinations
ricardoV94 Mar 13, 2023
5becc49
Simplify `check_logp` and related testing helpers
ricardoV94 Mar 13, 2023
f043ad9
Add flag to `CheckParameterValue` to inform whether it can be replace…
ricardoV94 Mar 9, 2023
4da5edf
Implement `check_icdf` helper to test icdf implementations
ricardoV94 Mar 13, 2023
19d8bfe
Fix release yml
ricardoV94 Mar 13, 2023
0bda194
Renamed aliases from at to pt
shreyas3156 Mar 7, 2023
1cc9863
Use more readable `ignore_logprob` helper in logprob submodule
ricardoV94 Feb 16, 2023
9836d00
Refactor utility to ignore the logprob of multiple variables while ke…
ricardoV94 Feb 16, 2023
c709abf
Remove `auto` argument from `pm.Deterministic` docstring (#6592)
shreyas3156 Mar 14, 2023
bae121a
Add HSGP Latent GP approximation (#6458)
bwengals Mar 14, 2023
fafc020
Use better `assert_no_rvs` from logprob submodule
ricardoV94 Mar 8, 2023
a542581
Add test for scans over sequences
ricardoV94 Mar 8, 2023
5dcd101
Fix logprob inference for scans with carried deterministic states
ricardoV94 Mar 8, 2023
239da11
Add definition of B in documentation for Beta distribution (#6604)
JoKeyser Mar 17, 2023
0334994
Derive logprob of IfElse graphs
ricardoV94 Feb 16, 2023
c7279b5
Remove shape functions (#6556)
symeneses Mar 17, 2023
67925df
Fix a typo in the docstring of OderedLogistic (#6611)
NathanielF Mar 18, 2023
473c952
Implement icdf for Univariate distribution (#6528)
michaelraczycki Mar 19, 2023
067d89b
Improved docstring for predictions argument in sample_posterior_predi…
fonnesbeck Mar 22, 2023
2fcce43
Added ICDF for the discrete uniform distribution.
gokuld Mar 23, 2023
a584d98
Rename logprob/joint_logprob to logprob/basic.py
ricardoV94 Mar 13, 2023
d1625da
Simplify single variable logp inference
ricardoV94 Mar 13, 2023
9a3f504
Separate logp-related dispatch helpers from user facing functions
ricardoV94 Mar 13, 2023
3f4dc72
Bump dev container base image
maresb Mar 23, 2023
be560e4
Define PRE_COMMIT_HOME in dev.Dockerfile
maresb Mar 23, 2023
83cd926
Do mamba and pre-commit updates in background
maresb Mar 23, 2023
6f80846
Fix jacobian dimensionality alignment in ChainedTransform
ricardoV94 Mar 20, 2023
d860f63
Fix broadcasting issue in ScaleTransform jacobian
ricardoV94 Mar 20, 2023
f3ce16f
Infer logp for elemwise transformations of multivariate variables
ricardoV94 Mar 17, 2023
f7861b5
Updating Error message when checking the starting values for MCMC (#6…
Dhruvanshu-Joshi Mar 29, 2023
ae9fcac
Implemented logprob for SpecifyShape and CheckandRaise (#6538)
Dhruvanshu-Joshi Mar 29, 2023
46f8e2f
Allow logcdf and icdf inference
ricardoV94 Mar 13, 2023
1bfd128
Install theme from pypi
OriolAbril Mar 29, 2023
a75af50
Add rtd preview action
OriolAbril Mar 29, 2023
3f2a1da
Improve collect_default_updates
ricardoV94 Mar 3, 2023
4c64eb9
Don't use `check_parameters` in `get_tau_sigma`.
ricardoV94 Mar 30, 2023
6404805
Add model debug helper
ricardoV94 Mar 30, 2023
8d5b236
update links to sponsor images
reshamas Mar 31, 2023
617f93c
install theme from conda (#6639)
OriolAbril Apr 1, 2023
eb4e353
fix docstrings for censored and timeseries (#6638)
alporter08 Apr 1, 2023
b7764dd
Added ICDF for the continuous exponential distribution. (#6641)
gokuld Apr 1, 2023
264afdc
⬆️ UPGRADE: Autoupdate pre-commit config (#6624)
twiecki Apr 2, 2023
48c8dc8
⬆️ UPGRADE: Autoupdate pre-commit config
Apr 3, 2023
041e2f9
Add Gitpod video to contributing page (#6646)
reshamas Apr 6, 2023
b1a75ae
Add timestamps to list of possible contributions (#6623)
reshamas Apr 6, 2023
e5a200f
Add welcome bot (#6602)
reshamas Apr 6, 2023
30c9179
Improve docstrings in GP module (#6652)
daniel-saunders-phil Apr 6, 2023
09dc9d0
Raise warning if RVs are present in derived probability graphs
ricardoV94 Apr 5, 2023
7973967
Add Type Hints to distribution parameters (#6635)
iykat Apr 7, 2023
0d7413e
Add all_tests job to be used as single requirement
ricardoV94 Apr 7, 2023
5d68bf3
Fix changed files filters in tests workflow
ricardoV94 Apr 8, 2023
2a324bc
Bump Pytensor dependency
ricardoV94 Apr 11, 2023
fa82fef
Fix bug in random function of HalfStudent (#6658)
Dhruvanshu-Joshi Apr 13, 2023
23572e1
Fix dtype casting bug in icdf function
ricardoV94 Apr 13, 2023
aae97a2
Arrange distributions and sub-contents alphabetically (#6653)
Dhruvanshu-Joshi Apr 13, 2023
e2eb26d
Do not require class_name for CustomDist and Simulator dists
ricardoV94 Mar 30, 2023
1ed4475
Allow logcdf inference in CustomDist
ricardoV94 Apr 13, 2023
ccb9cfb
Remove joint_logprob function from tests.logprob.utils
shreyas3156 Apr 4, 2023
ace9892
Move the joint logprob test for subtensors to test_mixture.py
shreyas3156 Apr 4, 2023
1b8bbfd
Solve conflicts in test_basic.py
shreyas3156 Apr 15, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Comment to be posted to on first time issues
newIssueWelcomeComment: >
[![Welcome Banner](https://zenodo.org/api/iiif/v2/0c0188d3-d03c-4830-a6e3-00405f5c22fa:8ff47a85-7250-4d86-8e48-2f346b48b2c1:BannerWelcome.jpg/full/750,/0/default.jpg)](https://zenodo.org/record/3695300)

:tada: Welcome to _PyMC_! :tada:
We're really excited to have your input into the project! :sparkling_heart:

<br>If you haven't done so already, please make sure you check out our [Contributing Guidelines](https://www.pymc.io/projects/docs/en/latest/contributing/index.html) and [Code of Conduct](https://github.com/pymc-devs/pymc/blob/main/CODE_OF_CONDUCT.md).


# Comment to be posted to on PRs from first time contributors in your repository
newPRWelcomeComment: >
[![Thank You Banner](https://zenodo.org/api/iiif/v2/0c0188d3-d03c-4830-a6e3-00405f5c22fa:7fbd97cf-283b-480c-b8e1-11866e26245c:BannerThanks.jpg/full/750,/0/default.jpg)](https://zenodo.org/record/3695300)

:sparkling_heart: Thanks for opening this pull request! :sparkling_heart:
The _PyMC_ community really appreciates your time and effort to contribute to the project.
Please make sure you have read our [Contributing Guidelines](https://www.pymc.io/projects/docs/en/latest/contributing/index.html) and filled in our pull request template to the best of your ability.


# Comment to be posted to on pull requests merged by a first time user
firstPRMergeComment: >
[![Congratulations Banner](https://zenodo.org/api/iiif/v2/0c0188d3-d03c-4830-a6e3-00405f5c22fa:32fbdb89-ae1b-434e-830c-88ade86724cc:BannerCongratulations.jpg/full/750,/0/default.jpg)](https://zenodo.org/record/3695300)

Congrats on merging your first pull request! :tada:
We here at _PyMC_ are proud of you! :sparkling_heart:
Thank you so much for your contribution :gift:
1 change: 1 addition & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ changelog:
labels:
- bug
- title: Documentation 📖
labels:
- docs
- title: Maintenance 🔧
labels:
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/rtd-link-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Read the Docs Pull Request Preview
on:
pull_request_target:
types:
- opened

permissions:
pull-requests: write

jobs:
documentation-links:
runs-on: ubuntu-latest
steps:
- uses: readthedocs/actions/preview@v1
with:
project-slug: "pymc"
81 changes: 61 additions & 20 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,10 @@ name: tests

on:
pull_request:
paths:
- ".github/workflows/tests.yml"
- "pymc/**.py"
- "*.py"
- "conda-envs/**"
- "codecov.yml"
- "requirements*.txt"
- "scripts/*.sh"
push:
branches: [main]
paths:
- ".github/workflows/tests.yml"
- "pymc/**.py"
- "*.py"
- "conda-envs/**"
- "codecov.yml"
- "scripts/*.sh"
branches:
- main


# Tests are split into multiple jobs to accelerate the CI.
# Different jobs should be organized to take approximately the same
Expand All @@ -30,12 +17,38 @@ on:
# enforces that test run just once per OS / floatX setting.

jobs:

changes:
name: "Check for changes"
runs-on: ubuntu-latest
outputs:
changes: ${{ steps.changes.outputs.src }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: dorny/paths-filter@v2
id: changes
with:
filters: |
src:
- ".github/workflows/tests.yml"
- "pymc/**/*.py"
- "tests/**/*.py"
- "*.py"
- "conda-envs/*"
- "requirements*.txt"
- "codecov.yml"
- "scripts/*.sh"

ubuntu:
needs: changes
if: ${{ needs.changes.outputs.changes == 'true' }}
strategy:
matrix:
os: [ubuntu-20.04]
floatx: [float64]
python-version: ["3.10"]
python-version: ["3.11"]
test-subset:
- |
tests/test_util.py
Expand All @@ -47,6 +60,7 @@ jobs:
tests/test_func_utils.py
tests/distributions/test_shape_utils.py
tests/distributions/test_mixture.py
tests/test_testing.py

- |
tests/distributions/test_continuous.py
Expand Down Expand Up @@ -75,6 +89,7 @@ jobs:
- |
tests/distributions/test_timeseries.py
tests/gp/test_cov.py
tests/gp/test_hsgp_approx.py
tests/gp/test_gp.py
tests/gp/test_mean.py
tests/gp/test_util.py
Expand All @@ -88,10 +103,10 @@ jobs:
tests/backends/test_mcbackend.py
tests/distributions/test_truncated.py
tests/logprob/test_abstract.py
tests/logprob/test_basic.py
tests/logprob/test_censoring.py
tests/logprob/test_composite_logprob.py
tests/logprob/test_cumsum.py
tests/logprob/test_joint_logprob.py
tests/logprob/test_mixture.py
tests/logprob/test_rewriting.py
tests/logprob/test_scan.py
Expand Down Expand Up @@ -158,7 +173,10 @@ jobs:
env_vars: TEST_SUBSET
name: ${{ matrix.os }} ${{ matrix.floatx }}
fail_ci_if_error: false

windows:
needs: changes
if: ${{ needs.changes.outputs.changes == 'true' }}
strategy:
matrix:
os: [windows-latest]
Expand Down Expand Up @@ -231,7 +249,10 @@ jobs:
env_vars: TEST_SUBSET
name: ${{ matrix.os }} ${{ matrix.floatx }}
fail_ci_if_error: false

macos:
needs: changes
if: ${{ needs.changes.outputs.changes == 'true' }}
strategy:
matrix:
os: [macos-latest]
Expand Down Expand Up @@ -307,12 +328,15 @@ jobs:
env_vars: TEST_SUBSET
name: ${{ matrix.os }} ${{ matrix.floatx }}
fail_ci_if_error: false

external_samplers:
needs: changes
if: ${{ needs.changes.outputs.changes == 'true' }}
strategy:
matrix:
os: [ubuntu-20.04]
floatx: [float64]
python-version: ["3.9"]
python-version: ["3.10"]
test-subset:
- tests/sampling/test_jax.py tests/sampling/test_mcmc_external.py
fail-fast: false
Expand Down Expand Up @@ -377,12 +401,15 @@ jobs:
env_vars: TEST_SUBSET
name: JAX tests - ${{ matrix.os }} ${{ matrix.floatx }}
fail_ci_if_error: false

float32:
needs: changes
if: ${{ needs.changes.outputs.changes == 'true' }}
strategy:
matrix:
os: [windows-latest]
floatx: [float32]
python-version: ["3.10"]
python-version: ["3.11"]
test-subset:
- tests/sampling/test_mcmc.py tests/ode/test_ode.py tests/ode/test_utils.py
fail-fast: false
Expand Down Expand Up @@ -446,3 +473,17 @@ jobs:
env_vars: TEST_SUBSET
name: ${{ matrix.os }} ${{ matrix.floatx }}
fail_ci_if_error: false

all_tests:
if: ${{ always() }}
runs-on: ubuntu-latest
needs: [ changes, ubuntu, windows, macos, external_samplers, float32 ]
steps:
- name: Check build matrix status
if: ${{ needs.changes.outputs.changes == 'true' &&
( needs.ubuntu.result != 'success' ||
needs.windows.result != 'success' ||
needs.macos.result != 'success' ||
needs.external_samplers.result != 'success' ||
needs.float32.result != 'success' ) }}
run: exit 1
7 changes: 2 additions & 5 deletions .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,14 @@ tasks:

# Install dependencies
sudo chown "$(id -u):$(id -g)" /opt/conda/conda-meta/history
micromamba install --yes --name base --file conda-envs/environment-dev.yml

# Install PyMC
pip install -e .
(micromamba install --yes --name base --file conda-envs/environment-dev.yml; pip install -e .) &> /tmp/install-init.log &

command: |
# Reinitialize devcontainer for good measure
_dev-init.sh

# Install the pre-commit hooks in the background if not already installed
pre-commit install --install-hooks
pre-commit install --install-hooks &> /tmp/pre-commit-init-output.log &

vscode:
extensions:
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ repos:
- id: pyupgrade
args: [--py37-plus]
- repo: https://github.com/psf/black
rev: 23.1.0
rev: 23.3.0
hooks:
- id: black
- id: black-jupyter
- repo: https://github.com/PyCQA/pylint
rev: v2.16.2
rev: v3.0.0a6
hooks:
- id: pylint
args: [--rcfile=.pylintrc]
Expand Down
4 changes: 0 additions & 4 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
recursive-include tests/data *
recursive-include source *
# because of an upload-size limit by PyPI, we're temporarily removing docs from the tarball:
recursive-exclude docs *
include requirements.txt
include *.md *.rst
include scripts/*.sh
Expand Down
10 changes: 7 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ Sponsors

|PyMCLabs|

|Mistplay|

.. |Binder| image:: https://mybinder.org/badge_logo.svg
:target: https://mybinder.org/v2/gh/pymc-devs/pymc/main?filepath=%2Fdocs%2Fsource%2Fnotebooks
.. |Build Status| image:: https://github.com/pymc-devs/pymc/workflows/pytest/badge.svg
Expand All @@ -159,9 +161,11 @@ Sponsors
:target: https://codecov.io/gh/pymc-devs/pymc
.. |Dockerhub| image:: https://img.shields.io/docker/automated/pymc/pymc.svg
:target: https://hub.docker.com/r/pymc/pymc
.. |NumFOCUS| image:: https://www.numfocus.org/wp-content/uploads/2017/03/1457562110.png
:target: http://www.numfocus.org/
.. |NumFOCUS_badge| image:: https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A
:target: http://www.numfocus.org/
.. |PyMCLabs| image:: https://raw.githubusercontent.com/pymc-devs/pymc/main/docs/logos/sponsors/pymc-labs.png
.. |NumFOCUS| image:: https://github.com/pymc-devs/brand/blob/main/sponsors/sponsor_logos/sponsor_numfocus.png?raw=true
:target: http://www.numfocus.org/
.. |PyMCLabs| image:: https://github.com/pymc-devs/brand/blob/main/sponsors/sponsor_logos/sponsor_pymc_labs.png?raw=true
:target: https://pymc-labs.io
.. |Mistplay| image:: https://github.com/pymc-devs/brand/blob/main/sponsors/sponsor_logos/sponsor_mistplay.png?raw=true
:target: https://www.mistplay.com/
6 changes: 3 additions & 3 deletions benchmarks/benchmarks/benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import numpy as np
import pandas as pd
import pytensor
import pytensor.tensor as at
import pytensor.tensor as pt

import pymc as pm

Expand Down Expand Up @@ -61,8 +61,8 @@ def mixture_model(random_seed=1234):
mu = pm.Normal("mu", mu=0.0, sigma=10.0, shape=w_true.shape)
enforce_order = pm.Potential(
"enforce_order",
at.switch(mu[0] - mu[1] <= 0, 0.0, -np.inf)
+ at.switch(mu[1] - mu[2] <= 0, 0.0, -np.inf),
pt.switch(mu[0] - mu[1] <= 0, 0.0, -np.inf)
+ pt.switch(mu[1] - mu[2] <= 0, 0.0, -np.inf),
)
tau = pm.Gamma("tau", alpha=1.0, beta=1.0, shape=w_true.shape)
pm.NormalMixture("x_obs", w=w, mu=mu, tau=tau, observed=x)
Expand Down
2 changes: 1 addition & 1 deletion conda-envs/environment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dependencies:
- numpy>=1.15.0
- pandas>=0.24.0
- pip
- pytensor=2.10.1
- pytensor>=2.11.0,<2.12
- python-graphviz
- networkx
- scipy>=1.4.1
Expand Down
6 changes: 3 additions & 3 deletions conda-envs/environment-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies:
- numpy>=1.15.0
- pandas>=0.24.0
- pip
- pytensor=2.9.1
- pytensor>=2.11.0,<2.12
- python-graphviz
- scipy>=1.4.1
- typing-extensions>=3.7.4
Expand All @@ -23,13 +23,13 @@ dependencies:
- myst-nb
- numpydoc
- pre-commit>=2.8.0
- pymc-sphinx-theme==0.13
- sphinx-copybutton
- sphinx-design
- sphinx-notfound-page
- sphinx>=1.5
- sphinx>=5
- sphinxext-rediraffe
- watermark
- sphinx-remove-toctrees
- pip:
- git+https://github.com/pymc-devs/pymc-sphinx-theme
- numdifftools>=0.9.40
2 changes: 1 addition & 1 deletion conda-envs/environment-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dependencies:
- numpy>=1.15.0
- pandas>=0.24.0
- pip
- pytensor=2.10.1
- pytensor>=2.11.0,<2.12
- python-graphviz
- networkx
- scipy>=1.4.1
Expand Down
2 changes: 1 addition & 1 deletion conda-envs/windows-environment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dependencies:
- numpy>=1.15.0
- pandas>=0.24.0
- pip
- pytensor=2.10.1
- pytensor>=2.11.0,<2.12
- python-graphviz
- networkx
- scipy>=1.4.1
Expand Down
2 changes: 1 addition & 1 deletion conda-envs/windows-environment-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dependencies:
- numpy>=1.15.0
- pandas>=0.24.0
- pip
- pytensor=2.10.1
- pytensor>=2.11.0,<2.12
- python-graphviz
- networkx
- scipy>=1.4.1
Expand Down
Loading