Skip to content

Commit 4fab824

Browse files
committed
Merge branch 'main' into v4-4523
2 parents 1ee5536 + c892317 commit 4fab824

Some content is hidden

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

64 files changed

+1029
-401
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/arviz_compat.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,18 @@ jobs:
2020
os: [ubuntu-latest, macos-latest]
2121
floatx: [float64]
2222
test-subset:
23-
- pymc/tests/test_distributions.py
24-
2523
- |
26-
pymc/tests/test_distributions_random.py
24+
pymc/tests/test_parallel_sampling.py
25+
pymc/tests/test_posteriors.py
2726
pymc/tests/test_sampling.py
27+
28+
- |
29+
pymc/tests/test_data_container.py
30+
pymc/tests/test_idata_conversion.py
31+
pymc/tests/test_missing.py
32+
pymc/tests/test_model.py
33+
pymc/tests/test_shape_handling.py
34+
pymc/tests/test_shared.py
2835
fail-fast: false
2936
runs-on: ${{ matrix.os }}
3037
env:
@@ -38,12 +45,12 @@ jobs:
3845
- name: Cache conda
3946
uses: actions/cache@v1
4047
env:
41-
# Increase this value to reset cache if environment-dev-py39.yml has not changed
48+
# Increase this value to reset cache if environment-test-py39.yml has not changed
4249
CACHE_NUMBER: 0
4350
with:
4451
path: ~/conda_pkgs_dir
4552
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
46-
hashFiles('conda-envs/environment-dev-py39.yml') }}
53+
hashFiles('conda-envs/environment-test-py39.yml') }}
4754
- name: Cache multiple paths
4855
uses: actions/cache@v2
4956
env:
@@ -61,19 +68,19 @@ jobs:
6168
miniforge-variant: Mambaforge
6269
miniforge-version: latest
6370
mamba-version: "*"
64-
activate-environment: pymc-dev-py39
71+
activate-environment: pymc-test-py39
6572
channel-priority: strict
66-
environment-file: conda-envs/environment-dev-py39.yml
73+
environment-file: conda-envs/environment-test-py39.yml
6774
use-mamba: true
6875
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
6976
- name: Install pymc
7077
run: |
71-
conda activate pymc-dev-py39
78+
conda activate pymc-test-py39
7279
pip install -e .
7380
python --version
7481
- name: Install latest arviz
7582
run: |
76-
conda activate pymc-dev-py39
83+
conda activate pymc-test-py39
7784
pip uninstall arviz -y
7885
pip install git+git://github.com/arviz-devs/arviz.git
7986
- name: Run tests

.github/workflows/jaxtests.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ jobs:
3434
- name: Cache conda
3535
uses: actions/cache@v1
3636
env:
37-
# Increase this value to reset cache if environment-dev-py39.yml has not changed
37+
# Increase this value to reset cache if environment-test-py39.yml has not changed
3838
CACHE_NUMBER: 0
3939
with:
4040
path: ~/conda_pkgs_dir
4141
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
42-
hashFiles('conda-envs/environment-dev-py39.yml') }}
42+
hashFiles('conda-envs/environment-test-py39.yml') }}
4343
- name: Cache multiple paths
4444
uses: actions/cache@v2
4545
env:
@@ -57,19 +57,19 @@ jobs:
5757
miniforge-variant: Mambaforge
5858
miniforge-version: latest
5959
mamba-version: "*"
60-
activate-environment: pymc-dev-py39
60+
activate-environment: pymc-test-py39
6161
channel-priority: strict
62-
environment-file: conda-envs/environment-dev-py39.yml
62+
environment-file: conda-envs/environment-test-py39.yml
6363
use-mamba: true
6464
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
6565
- name: Install pymc
6666
run: |
67-
conda activate pymc-dev-py39
67+
conda activate pymc-test-py39
6868
pip install -e .
6969
python --version
7070
- name: Install jax specific dependencies
7171
run: |
72-
conda activate pymc-dev-py39
72+
conda activate pymc-test-py39
7373
pip install "numpyro>=0.8.0"
7474
- name: Run tests
7575
run: |

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ repos:
2424
- id: pyupgrade
2525
args: [--py37-plus]
2626
- repo: https://github.com/psf/black
27-
rev: 21.12b0
27+
rev: 22.1.0
2828
hooks:
2929
- id: black
3030
- repo: https://github.com/PyCQA/pylint

benchmarks/benchmarks/benchmarks.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ def glm_hierarchical_model(random_seed=123):
3232

3333
n_counties = len(data.county.unique())
3434
with pm.Model() as model:
35-
mu_a = pm.Normal("mu_a", mu=0.0, sd=100 ** 2)
35+
mu_a = pm.Normal("mu_a", mu=0.0, sd=100**2)
3636
sigma_a = pm.HalfCauchy("sigma_a", 5)
37-
mu_b = pm.Normal("mu_b", mu=0.0, sd=100 ** 2)
37+
mu_b = pm.Normal("mu_b", mu=0.0, sd=100**2)
3838
sigma_b = pm.HalfCauchy("sigma_b", 5)
3939
a = pm.Normal("a", mu=0, sd=1, shape=n_counties)
4040
b = pm.Normal("b", mu=0, sd=1, shape=n_counties)
@@ -70,7 +70,7 @@ def mixture_model(random_seed=1234):
7070
# Initialization can be poorly specified, this is a hack to make it work
7171
start = {
7272
"mu": mu_true.copy(),
73-
"tau_log__": np.log(1.0 / sigma ** 2),
73+
"tau_log__": np.log(1.0 / sigma**2),
7474
"w_stickbreaking__": np.array([-0.03, 0.44]),
7575
}
7676
return model, start
@@ -137,8 +137,8 @@ def time_drug_evaluation(self):
137137
group2_mean = pm.Normal("group2_mean", y_mean, sd=y_std)
138138
group1_std = pm.Uniform("group1_std", lower=sigma_low, upper=sigma_high)
139139
group2_std = pm.Uniform("group2_std", lower=sigma_low, upper=sigma_high)
140-
lambda_1 = group1_std ** -2
141-
lambda_2 = group2_std ** -2
140+
lambda_1 = group1_std**-2
141+
lambda_2 = group2_std**-2
142142

143143
nu = pm.Exponential("ν_minus_one", 1 / 29.0) + 1
144144

@@ -147,7 +147,7 @@ def time_drug_evaluation(self):
147147
diff_of_means = pm.Deterministic("difference of means", group1_mean - group2_mean)
148148
pm.Deterministic("difference of stds", group1_std - group2_std)
149149
pm.Deterministic(
150-
"effect size", diff_of_means / np.sqrt((group1_std ** 2 + group2_std ** 2) / 2)
150+
"effect size", diff_of_means / np.sqrt((group1_std**2 + group2_std**2) / 2)
151151
)
152152
pm.sample(
153153
draws=20000, cores=4, chains=4, progressbar=False, compute_convergence_checks=False

conda-envs/environment-dev-py37.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,32 @@ channels:
44
- conda-forge
55
- defaults
66
dependencies:
7-
- aeppl=0.0.18
7+
- aeppl=0.0.26
88
- aesara=2.3.8
99
- arviz>=0.11.4
10+
- blas
1011
- cachetools>=4.2.1
1112
- cloudpickle
1213
- fastprogress>=0.2.0
1314
- h5py>=2.7
14-
- ipython
15+
- ipython>=7.16
1516
- myst-nb
16-
- numpy>=1.15
17+
- numpy>=1.15.0
1718
- numpydoc<1.2
18-
- pandas>=0.24
19+
- pandas>=0.24.0
1920
- pip
2021
- pre-commit>=2.8.0
2122
- pydata-sphinx-theme
2223
- pytest-cov>=2.5
2324
- pytest>=3.0
2425
- python-graphviz
2526
- python=3.7
26-
- scipy>1.4.1
27+
- scipy>=1.4.1,<1.8.0
2728
- sphinx-copybutton
2829
- sphinx-notfound-page
2930
- sphinx>=1.5
30-
- typing-extensions
31+
- typing-extensions>=3.7.4
32+
- watermark
3133
- pip:
3234
- polyagamma
3335
- sphinx-design

conda-envs/environment-dev-py38.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@ channels:
44
- conda-forge
55
- defaults
66
dependencies:
7-
- aeppl=0.0.18
7+
- aeppl=0.0.26
88
- aesara=2.3.8
99
- arviz>=0.11.4
10+
- blas
1011
- cachetools>=4.2.1
1112
- cloudpickle
1213
- fastprogress>=0.2.0
1314
- h5py>=2.7
14-
- ipython
15+
- ipython>=7.16
1516
- myst-nb
1617
- numpy>=1.15.0
1718
- numpydoc<1.2
@@ -23,11 +24,12 @@ dependencies:
2324
- pytest>=3.0
2425
- python-graphviz
2526
- python=3.8
26-
- scipy>1.4.1
27+
- scipy>=1.4.1,<1.8.0
2728
- sphinx-copybutton
2829
- sphinx-notfound-page
2930
- sphinx>=1.5
3031
- typing-extensions>=3.7.4
32+
- watermark
3133
- pip:
3234
- polyagamma
3335
- sphinx-design

conda-envs/environment-dev-py39.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,32 @@ channels:
44
- conda-forge
55
- defaults
66
dependencies:
7-
- aeppl=0.0.18
7+
- aeppl=0.0.26
88
- aesara=2.3.8
99
- arviz>=0.11.4
10+
- blas
1011
- cachetools>=4.2.1
1112
- cloudpickle
1213
- fastprogress>=0.2.0
1314
- h5py>=2.7
14-
- ipython
15+
- ipython>=7.16
1516
- myst-nb
1617
- numpy>=1.15.0
1718
- numpydoc<1.2
18-
- pandas
19+
- pandas>=0.24.0
1920
- pip
2021
- pre-commit>=2.8.0
2122
- pydata-sphinx-theme
2223
- pytest-cov>=2.5
2324
- pytest>=3.0
2425
- python-graphviz
2526
- python=3.9
26-
- scipy>1.4.1
27+
- scipy>=1.4.1,<1.8.0
2728
- sphinx-copybutton
2829
- sphinx-notfound-page
2930
- sphinx>=1.5
3031
- typing-extensions>=3.7.4
32+
- watermark
3133
- pip:
3234
- polyagamma
3335
- sphinx-design

conda-envs/environment-test-py37.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,23 @@ channels:
44
- conda-forge
55
- defaults
66
dependencies:
7-
- aeppl=0.0.18
7+
- aeppl=0.0.26
88
- aesara=2.3.8
99
- arviz>=0.11.4
10+
- blas
1011
- cachetools>=4.2.1
1112
- cloudpickle
1213
- fastprogress>=0.2.0
1314
- h5py>=2.7
14-
- ipython
15+
- ipython>=7.16
1516
- libblas=*=*mkl
1617
- mkl-service
1718
- numpy>=1.15.0
18-
- pandas>=0.24
19+
- pandas>=0.24.0
1920
- pre-commit>=2.8.0
2021
- pytest-cov>=2.5
2122
- pytest>=3.0
2223
- python-graphviz
2324
- python=3.7
24-
- scipy>1.4.1
25-
- typing-extensions
25+
- scipy>=1.4.1,<1.8.0
26+
- typing-extensions>=3.7.4

conda-envs/environment-test-py38.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,23 @@ channels:
44
- conda-forge
55
- defaults
66
dependencies:
7-
- aeppl=0.0.18
7+
- aeppl=0.0.26
88
- aesara=2.3.8
99
- arviz>=0.11.4
10+
- blas
1011
- cachetools>=4.2.1
1112
- cloudpickle
1213
- fastprogress>=0.2.0
1314
- h5py>=2.7
14-
- ipython
15+
- ipython>=7.16
1516
- libblas=*=*mkl
1617
- mkl-service
1718
- numpy>=1.15.0
18-
- pandas
19+
- pandas>=0.24.0
1920
- pre-commit>=2.8.0
2021
- pytest-cov>=2.5
2122
- pytest>=3.0
2223
- python-graphviz
2324
- python=3.8
24-
- scipy>1.4.1
25+
- scipy>=1.4.1,<1.8.0
2526
- typing-extensions>=3.7.4

conda-envs/environment-test-py39.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,23 @@ channels:
44
- conda-forge
55
- defaults
66
dependencies:
7-
- aeppl=0.0.18
7+
- aeppl=0.0.26
88
- aesara=2.3.8
99
- arviz>=0.11.4
10-
- cachetools
10+
- blas
11+
- cachetools>=4.2.1
1112
- cloudpickle
1213
- fastprogress>=0.2.0
13-
- h5py
14+
- h5py>=2.7
1415
- ipython>=7.16
1516
- libblas=*=*mkl
1617
- mkl-service
1718
- numpy>=1.15.0
18-
- pandas
19+
- pandas>=0.24.0
1920
- pre-commit>=2.8.0
2021
- pytest-cov>=2.5
2122
- pytest>=3.0
2223
- python-graphviz
2324
- python=3.9
24-
- scipy>1.4.1
25+
- scipy>=1.4.1,<1.8.0
2526
- typing-extensions>=3.7.4

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,23 @@ channels:
44
- defaults
55
dependencies:
66
# base dependencies (see install guide for Windows)
7-
- aeppl=0.0.18
7+
- aeppl=0.0.26
88
- aesara=2.3.8
99
- arviz>=0.11.4
10+
- blas
1011
- cachetools>=4.2.1
1112
- cloudpickle
1213
- fastprogress>=0.2.0
13-
- h5py
14+
- h5py>=2.7
1415
- numpy>=1.15.0
15-
- pandas
16+
- pandas>=0.24.0
1617
- pip
1718
- python=3.8
1819
- python-graphviz
19-
- scipy>1.4.1
20+
- scipy>=1.4.1,<1.8.0
2021
- typing-extensions>=3.7.4
2122
# Extra stuff for dev, testing and docs build
22-
- ipython
23+
- ipython>=7.16
2324
- myst-nb
2425
- numpydoc<1.2
2526
- pre-commit>=2.8.0

0 commit comments

Comments
 (0)