diff --git a/pymc_experimental/inference/pathfinder.py b/pymc_experimental/inference/pathfinder.py index 85c1981e..94a0bb32 100644 --- a/pymc_experimental/inference/pathfinder.py +++ b/pymc_experimental/inference/pathfinder.py @@ -25,7 +25,7 @@ import numpy as np import pymc as pm from pymc import modelcontext -from pymc.sampling_jax import get_jaxified_graph +from pymc.sampling.jax import get_jaxified_graph from pymc.util import RandomSeed, _get_seeds_per_chain, get_default_varnames diff --git a/pymc_experimental/tests/statespace/test_VARMAX.py b/pymc_experimental/tests/statespace/test_VARMAX.py index f923f524..03d8f59b 100644 --- a/pymc_experimental/tests/statespace/test_VARMAX.py +++ b/pymc_experimental/tests/statespace/test_VARMAX.py @@ -96,6 +96,7 @@ def test_VARMAX_param_counts_match_statsmodels(data, order, var): @pytest.mark.parametrize("order", orders, ids=ids) @pytest.mark.filterwarnings("ignore::statsmodels.tools.sm_exceptions.EstimationWarning") +@pytest.mark.filterwarnings("ignore::FutureWarning") def test_VARMAX_update_matches_statsmodels(data, order, rng): p, q = order diff --git a/pymc_experimental/tests/statespace/utilities/test_helpers.py b/pymc_experimental/tests/statespace/utilities/test_helpers.py index 3b093185..e8f58d05 100644 --- a/pymc_experimental/tests/statespace/utilities/test_helpers.py +++ b/pymc_experimental/tests/statespace/utilities/test_helpers.py @@ -227,7 +227,7 @@ def simulate_from_numpy_model(mod, rng, param_dict, steps=100): y = np.zeros(steps) x[0] = x0 - y[0] = Z @ x0 + y[0] = (Z @ x0).squeeze() if not np.allclose(H, 0): y[0] += rng.multivariate_normal(mean=np.zeros(1), cov=H) @@ -245,7 +245,7 @@ def simulate_from_numpy_model(mod, rng, param_dict, steps=100): error = 0 x[t] = c + T @ x[t - 1] + innov - y[t] = d + Z @ x[t] + error + y[t] = (d + Z @ x[t] + error).squeeze() return x, y diff --git a/pymc_experimental/tests/test_pathfinder.py b/pymc_experimental/tests/test_pathfinder.py index aa680a23..1be2a22c 100644 --- a/pymc_experimental/tests/test_pathfinder.py +++ b/pymc_experimental/tests/test_pathfinder.py @@ -23,6 +23,9 @@ # TODO: Remove this filterwarning after pytensor uses jnp.prod instead of jnp.product @pytest.mark.skipif(sys.platform == "win32", reason="JAX not supported on windows.") +@pytest.mark.skipif( + sys.version_info < (3, 10), reason="pymc.sampling.jax does not currently support python < 3.10" +) @pytest.mark.filterwarnings("ignore::DeprecationWarning") def test_pathfinder(): # Data of the Eight Schools Model diff --git a/pyproject.toml b/pyproject.toml index ebc76bc6..d1bc518f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,6 +7,14 @@ addopts = [ "--ignore=pymc_experimental/model_builder.py" ] +filterwarnings =[ + "error", + # Raised by arviz when the model_builder class adds non-standard group names to InferenceData + "ignore::UserWarning:arviz.data.inference_data", + + # bool8, find_common_type, cumproduct, and product had deprecation warnings added in numpy 1.25 + 'ignore:.*(\b(pkg_resources\.declare_namespace|np\.bool8|np\.find_common_type|cumproduct|product)\b).*:DeprecationWarning', +] [tool.black] line-length = 100 @@ -20,6 +28,7 @@ exclude_lines = [ [tool.isort] profile = "black" +# lines_between_types = 1 [tool.nbqa.mutate] isort = 1 diff --git a/pytest.ini b/pytest.ini deleted file mode 100644 index 51b995fe..00000000 --- a/pytest.ini +++ /dev/null @@ -1,7 +0,0 @@ -[pytest] -filterwarnings = - error - ignore:.*(\b(pkg_resources\.declare_namespace|np\.bool8)\b).*:DeprecationWarning - ignore::UserWarning:arviz.data.inference_data - ignore::DeprecationWarning:pkg_resources - ignore:ml_dtypes.float8_e4m3b11 is deprecated. Use ml_dtypes.float8_e4m3b11fnuz:DeprecationWarning diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 0b4c86f9..00000000 --- a/setup.cfg +++ /dev/null @@ -1,11 +0,0 @@ -[tool:pytest] -testpaths = tests -filterwarnings = - error - ignore::DeprecationWarning:numpy.core.fromnumeric - ignore:::arviz.* - ignore:DeprecationWarning - -[isort] -lines_between_types = 1 -profile = black