Skip to content

Commit 150fb0f

Browse files
HasnainRazricardoV94
authored andcommitted
Bump PyMC minimum version requirement
1 parent 79c4dc1 commit 150fb0f

File tree

5 files changed

+10
-12
lines changed

5 files changed

+10
-12
lines changed

Diff for: conda-envs/environment-test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ dependencies:
1111
- xhistogram
1212
- statsmodels
1313
- pip:
14-
- pymc>=5.9.0 # CI was failing to resolve
14+
- pymc>=5.10.0 # CI was failing to resolve
1515
- blackjax
1616
- scikit-learn

Diff for: conda-envs/windows-environment-test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ dependencies:
1010
- xhistogram
1111
- statsmodels
1212
- pip:
13-
- pymc>=5.9.0 # CI was failing to resolve
13+
- pymc>=5.10.0 # CI was failing to resolve
1414
- blackjax
1515
- scikit-learn

Diff for: pymc_experimental/model/marginal_model.py

-2
Original file line numberDiff line numberDiff line change
@@ -461,8 +461,6 @@ def finite_discrete_marginal_rv_logp(op, values, *inputs, **kwargs):
461461
for i in range(len(marginalized_rv_domain))
462462
]
463463
else:
464-
# Make sure this rewrite is registered
465-
from pymc.pytensorf import local_remove_check_parameter
466464

467465
def logp_fn(marginalized_rv_const, *non_sequences):
468466
return joint_logp_op(marginalized_rv_const, *non_sequences)

Diff for: pymc_experimental/utils/prior.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919
import numpy as np
2020
import pymc as pm
2121
import pytensor.tensor as pt
22-
from pymc.logprob.transforms import RVTransform
22+
from pymc.logprob.transforms import Transform
2323

2424

2525
class ParamCfg(TypedDict):
2626
name: str
27-
transform: Optional[RVTransform]
27+
transform: Optional[Transform]
2828
dims: Optional[Union[str, Tuple[str]]]
2929

3030

@@ -44,14 +44,14 @@ class FlatInfo(TypedDict):
4444
info: List[VarInfo]
4545

4646

47-
def _arg_to_param_cfg(key, value: Optional[Union[ParamCfg, RVTransform, str, Tuple]] = None):
47+
def _arg_to_param_cfg(key, value: Optional[Union[ParamCfg, Transform, str, Tuple]] = None):
4848
if value is None:
4949
cfg = ParamCfg(name=key, transform=None, dims=None)
5050
elif isinstance(value, Tuple):
5151
cfg = ParamCfg(name=key, transform=None, dims=value)
5252
elif isinstance(value, str):
5353
cfg = ParamCfg(name=value, transform=None, dims=None)
54-
elif isinstance(value, RVTransform):
54+
elif isinstance(value, Transform):
5555
cfg = ParamCfg(name=key, transform=value, dims=None)
5656
else:
5757
cfg = value.copy()
@@ -62,7 +62,7 @@ def _arg_to_param_cfg(key, value: Optional[Union[ParamCfg, RVTransform, str, Tup
6262

6363

6464
def _parse_args(
65-
var_names: Sequence[str], **kwargs: Union[ParamCfg, RVTransform, str, Tuple]
65+
var_names: Sequence[str], **kwargs: Union[ParamCfg, Transform, str, Tuple]
6666
) -> Dict[str, ParamCfg]:
6767
results = dict()
6868
for var in var_names:
@@ -133,7 +133,7 @@ def prior_from_idata(
133133
name="trace_prior_",
134134
*,
135135
var_names: Sequence[str] = (),
136-
**kwargs: Union[ParamCfg, RVTransform, str, Tuple]
136+
**kwargs: Union[ParamCfg, Transform, str, Tuple]
137137
) -> Dict[str, pt.TensorVariable]:
138138
"""
139139
Create a prior from posterior using MvNormal approximation.
@@ -153,7 +153,7 @@ def prior_from_idata(
153153
Inference data with posterior group
154154
var_names: Sequence[str]
155155
names of variables to take as is from the posterior
156-
kwargs: Union[ParamCfg, RVTransform, str, Tuple]
156+
kwargs: Union[ParamCfg, Transform, str, Tuple]
157157
names of variables with additional configuration, see more in Examples
158158
159159
Examples

Diff for: requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
pymc>=5.8.2
1+
pymc>=5.10.0
22
scikit-learn

0 commit comments

Comments
 (0)