Skip to content

Commit

Permalink
Upgrade pymc, make new release.
Browse files Browse the repository at this point in the history
  • Loading branch information
ColCarroll committed Dec 10, 2024
1 parent 5ef1329 commit 9972f23
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 9 deletions.
6 changes: 5 additions & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ confidence=
# --disable=W".
disable=fixme,
no-else-return,
too-many-lines
too-many-lines,
similarities

# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
Expand Down Expand Up @@ -484,6 +485,9 @@ preferred-modules=

[DESIGN]

# Maximum number of positional arguments for function / method.
max-positional-arguments=10

# Maximum number of arguments for function / method.
max-args=10

Expand Down
2 changes: 1 addition & 1 deletion pyei/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""A package for rpv and ecological inference"""

__version__ = "1.1.1"
__version__ = "1.1.2"
from .two_by_two import *
from .goodmans_er import *
from .plot_utils import *
Expand Down
9 changes: 6 additions & 3 deletions pyei/r_by_c.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"""

import warnings
from pymc import sampling_jax
import pymc as pm
import numpy as np
from .plot_utils import (
plot_boxplots,
Expand Down Expand Up @@ -200,8 +200,11 @@ def fit( # pylint: disable=too-many-branches
"multinomial-dirichlet",
]: # for models whose sampling is w/ pycm
with self.sim_model: # pylint: disable=not-context-manager
self.sim_trace = sampling_jax.sample_numpyro_nuts(
target_accept=target_accept, tune=tune, **other_sampling_args
self.sim_trace = pm.sample(
target_accept=target_accept,
tune=tune,
nuts_sampler="numpyro",
**other_sampling_args,
)
elif self.model_name == "greiner-quinn":
self.sim_trace = pyei_greiner_quinn_sample(
Expand Down
4 changes: 2 additions & 2 deletions pyei/two_by_two.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import warnings
import pymc as pm
from pymc import sampling_jax
import numpy as np
import pytensor.tensor as at
import pytensor
Expand Down Expand Up @@ -847,9 +846,10 @@ def fit(
**other_sampling_args,
)
else:
self.sim_trace = sampling_jax.sample_numpyro_nuts(
self.sim_trace = pm.sample(
target_accept=target_accept,
tune=tune,
nuts_sampler="numpyro",
**other_sampling_args,
)

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pymc >= 5.10.0
pymc >= 5.18.0
arviz
scikit-learn
matplotlib
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def get_requirements():
with codecs.open(REQUIREMENTS_FILE, "r", encoding="utf-8") as buff:
return buff.read().splitlines()
except:
return """pymc >= 5.10.0
return """pymc >= 5.18.0
arviz
scikit-learn
matplotlib
Expand Down

0 comments on commit 9972f23

Please sign in to comment.