Skip to content

Commit 21147bc

Browse files
Handle release of pymc 5.25.0 (#1844)
1 parent 3df6513 commit 21147bc

File tree

7 files changed

+16
-11
lines changed

7 files changed

+16
-11
lines changed

.github/workflows/pypi.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
fetch-depth: 0
1818
- uses: actions/setup-python@v5
1919
with:
20-
python-version: "3.10"
20+
python-version: "3.11"
2121
- name: Build the sdist and the wheel
2222
run: |
2323
pip install build
@@ -62,7 +62,7 @@ jobs:
6262
repository-url: https://test.pypi.org/legacy/
6363
- uses: actions/setup-python@v5
6464
with:
65-
python-version: "3.10"
65+
python-version: "3.11"
6666
- name: Test pip install from test.pypi
6767
run: |
6868
python -m venv venv-test-pypi

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
runs-on: ubuntu-latest
3131
strategy:
3232
matrix:
33-
config: [ {python-version: "3.10", oldest-pymc: false}, {python-version: "3.12", oldest-pymc: true}]
33+
config: [ {python-version: "3.11", oldest-pymc: false}, {python-version: "3.13", oldest-pymc: true}]
3434
split:
3535
- "--ignore tests/mmm --ignore tests/clv"
3636
- "tests/mmm --ignore tests/mmm/test_tvp.py --ignore tests/mmm/test_budget_optimizer.py --ignore tests/mmm/test_hsgp.py --ignore tests/mmm/test_transformers.py"
@@ -82,7 +82,7 @@ jobs:
8282
- name: Set up Python
8383
uses: actions/setup-python@v5
8484
with:
85-
python-version: "3.10"
85+
python-version: "3.11"
8686
cache: "pip"
8787
cache-dependency-path: "pyproject.toml"
8888
- name: Run tests

.github/workflows/uml.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Set up Python
1919
uses: actions/setup-python@v5
2020
with:
21-
python-version: "3.10"
21+
python-version: "3.13"
2222

2323
- name: Configure Git Identity
2424
run: |

.readthedocs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ sphinx:
66
configuration: docs/source/conf.py
77

88
build:
9-
os: ubuntu-22.04
9+
os: ubuntu-24.04
1010
tools:
11-
python: "3.10"
11+
python: "3.11"
1212
jobs:
1313
pre_build:
1414
# Install core dependencies first

environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ dependencies:
1313
- streamlit>=1.25.0
1414
- pip
1515
- pydantic
16-
- preliz
16+
- preliz>=0.20.0
1717
- pyprojroot
1818
# NOTE: Keep minimum pymc version in sync with ci.yml `OLDEST_PYMC_VERSION`
1919
- pymc>=5.23.0

pymc_marketing/mmm/budget_optimizer.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
from arviz import InferenceData
2626
from pydantic import BaseModel, ConfigDict, Field, InstanceOf
2727
from pymc import Model, do
28-
from pymc.logprob.utils import rvs_in_graph
2928
from pymc.model.transform.optimization import freeze_dims_and_data
3029
from pymc.pytensorf import rewrite_pregrad
3130
from pytensor import clone_replace, function
@@ -35,6 +34,11 @@
3534
from scipy.optimize import OptimizeResult, minimize
3635
from xarray import DataArray
3736

37+
try:
38+
from pymc.pytensorf import rvs_in_graph
39+
except ImportError:
40+
from pymc.logprob.utils import rvs_in_graph
41+
3842
from pymc_marketing.mmm.constraints import (
3943
Constraint,
4044
build_default_sum_constraint,

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ classifiers = [
1313
"Development Status :: 5 - Production/Stable",
1414
"Programming Language :: Python",
1515
"Programming Language :: Python :: 3",
16-
"Programming Language :: Python :: 3.10",
1716
"Programming Language :: Python :: 3.11",
1817
"Programming Language :: Python :: 3.12",
18+
"Programming Language :: Python :: 3.13",
1919
"License :: OSI Approved :: Apache Software License",
2020
"Intended Audience :: Science/Research",
2121
"Topic :: Scientific/Engineering",
@@ -38,7 +38,7 @@ dependencies = [
3838
"xarray>=2024.1.0",
3939
"xarray-einstats>=0.5.1",
4040
"pyprojroot",
41-
"preliz>=0.8.0",
41+
"preliz>=0.20.0",
4242
]
4343

4444
[project.optional-dependencies]
@@ -76,6 +76,7 @@ test = [
7676
"blackjax",
7777
"nutpie",
7878
"numpyro",
79+
"jax<0.7.0", # related to https://github.com/pyro-ppl/numpyro/issues/2051
7980
"graphviz>=0.20.1",
8081
"lifetimes==0.11.3",
8182
"papermill",

0 commit comments

Comments
 (0)