diff --git a/conda-envs/environment-dev.yml b/conda-envs/environment-dev.yml index 36fa9636716..db607bcfb65 100644 --- a/conda-envs/environment-dev.yml +++ b/conda-envs/environment-dev.yml @@ -14,7 +14,7 @@ dependencies: - numpy>=1.15.0 - pandas>=0.24.0 - pip -- pytensor>=2.15.0,<2.16 +- pytensor>=2.16.1,<2.17 - python-graphviz - networkx - scipy>=1.4.1 diff --git a/conda-envs/environment-docs.yml b/conda-envs/environment-docs.yml index d67c4a1d21d..e42e20307b2 100644 --- a/conda-envs/environment-docs.yml +++ b/conda-envs/environment-docs.yml @@ -12,7 +12,7 @@ dependencies: - numpy>=1.15.0 - pandas>=0.24.0 - pip -- pytensor>=2.15.0,<2.16 +- pytensor>=2.16.1,<2.17 - python-graphviz - scipy>=1.4.1 - typing-extensions>=3.7.4 diff --git a/conda-envs/environment-test.yml b/conda-envs/environment-test.yml index 2f06381b913..1f26a72b11a 100644 --- a/conda-envs/environment-test.yml +++ b/conda-envs/environment-test.yml @@ -17,7 +17,7 @@ dependencies: - numpy>=1.15.0 - pandas>=0.24.0 - pip -- pytensor>=2.15.0,<2.16 +- pytensor>=2.16.1,<2.17 - python-graphviz - networkx - scipy>=1.4.1 diff --git a/conda-envs/windows-environment-dev.yml b/conda-envs/windows-environment-dev.yml index 8efc0e6da68..40f0cb6c533 100644 --- a/conda-envs/windows-environment-dev.yml +++ b/conda-envs/windows-environment-dev.yml @@ -14,7 +14,7 @@ dependencies: - numpy>=1.15.0 - pandas>=0.24.0 - pip -- pytensor>=2.15.0,<2.16 +- pytensor>=2.16.1,<2.17 - python-graphviz - networkx - scipy>=1.4.1 diff --git a/conda-envs/windows-environment-test.yml b/conda-envs/windows-environment-test.yml index 1f08ac1ed97..9471a0d11bc 100644 --- a/conda-envs/windows-environment-test.yml +++ b/conda-envs/windows-environment-test.yml @@ -17,7 +17,7 @@ dependencies: - numpy>=1.15.0 - pandas>=0.24.0 - pip -- pytensor>=2.15.0,<2.16 +- pytensor>=2.16.1,<2.17 - python-graphviz - networkx - scipy>=1.4.1 diff --git a/pymc/data.py b/pymc/data.py index 98f8a399704..d75fd698b85 100644 --- a/pymc/data.py +++ b/pymc/data.py @@ -32,7 +32,7 @@ from pytensor.tensor.random.basic import IntegersRV from pytensor.tensor.subtensor import AdvancedSubtensor from pytensor.tensor.type import TensorType -from pytensor.tensor.var import TensorConstant, TensorVariable +from pytensor.tensor.variable import TensorConstant, TensorVariable import pymc as pm diff --git a/pymc/distributions/bound.py b/pymc/distributions/bound.py index 41a2e44f3cf..48ff75fdb29 100644 --- a/pymc/distributions/bound.py +++ b/pymc/distributions/bound.py @@ -18,7 +18,7 @@ from pytensor.tensor import as_tensor_variable from pytensor.tensor.random.op import RandomVariable -from pytensor.tensor.var import TensorVariable +from pytensor.tensor.variable import TensorVariable from pymc.distributions.continuous import BoundedContinuous, bounded_cont_transform from pymc.distributions.dist_math import check_parameters diff --git a/pymc/distributions/continuous.py b/pymc/distributions/continuous.py index 1df2bd6efeb..1b096667ae4 100644 --- a/pymc/distributions/continuous.py +++ b/pymc/distributions/continuous.py @@ -54,7 +54,7 @@ vonmises, ) from pytensor.tensor.random.op import RandomVariable -from pytensor.tensor.var import TensorConstant +from pytensor.tensor.variable import TensorConstant from pymc.logprob.abstract import _logcdf_helper, _logprob_helper from pymc.logprob.basic import icdf diff --git a/pymc/distributions/distribution.py b/pymc/distributions/distribution.py index 697a3b9178f..6bf39ed9987 100644 --- a/pymc/distributions/distribution.py +++ b/pymc/distributions/distribution.py @@ -35,7 +35,7 @@ from pytensor.tensor.random.rewriting import local_subtensor_rv_lift from pytensor.tensor.random.utils import normalize_size_param from pytensor.tensor.rewriting.shape import ShapeFeature -from pytensor.tensor.var import TensorVariable +from pytensor.tensor.variable import TensorVariable from typing_extensions import TypeAlias from pymc.distributions.shape_utils import ( diff --git a/pymc/distributions/shape_utils.py b/pymc/distributions/shape_utils.py index 3f4d1baca7e..f85e5dc4771 100644 --- a/pymc/distributions/shape_utils.py +++ b/pymc/distributions/shape_utils.py @@ -31,7 +31,7 @@ from pytensor.raise_op import Assert from pytensor.tensor.random.op import RandomVariable from pytensor.tensor.shape import SpecifyShape -from pytensor.tensor.var import TensorVariable +from pytensor.tensor.variable import TensorVariable from typing_extensions import TypeAlias from pymc.model import modelcontext diff --git a/pymc/distributions/simulator.py b/pymc/distributions/simulator.py index ddc4afd0a6a..6f1bb30d023 100644 --- a/pymc/distributions/simulator.py +++ b/pymc/distributions/simulator.py @@ -20,7 +20,7 @@ from pytensor.graph.op import Apply, Op from pytensor.tensor.random.op import RandomVariable -from pytensor.tensor.var import TensorVariable +from pytensor.tensor.variable import TensorVariable from scipy.spatial import cKDTree from pymc.distributions.distribution import Distribution, _moment diff --git a/pymc/gp/cov.py b/pymc/gp/cov.py index 8a6ec534ca8..905fdef9307 100644 --- a/pymc/gp/cov.py +++ b/pymc/gp/cov.py @@ -25,7 +25,7 @@ from pytensor.graph.basic import Variable from pytensor.tensor.sharedvar import TensorSharedVariable -from pytensor.tensor.var import TensorConstant, TensorVariable +from pytensor.tensor.variable import TensorConstant, TensorVariable __all__ = [ "Constant", diff --git a/pymc/gp/util.py b/pymc/gp/util.py index 927448a5a90..0e683a5d389 100644 --- a/pymc/gp/util.py +++ b/pymc/gp/util.py @@ -18,7 +18,7 @@ import pytensor.tensor as pt from pytensor.compile import SharedVariable -from pytensor.tensor.var import TensorConstant +from pytensor.tensor.variable import TensorConstant from scipy.cluster.vq import kmeans # Avoid circular dependency when importing modelcontext diff --git a/pymc/initial_point.py b/pymc/initial_point.py index dfdca37c61a..b4248e7eda4 100644 --- a/pymc/initial_point.py +++ b/pymc/initial_point.py @@ -22,7 +22,7 @@ from pytensor.graph.basic import Variable from pytensor.graph.fg import FunctionGraph -from pytensor.tensor.var import TensorVariable +from pytensor.tensor.variable import TensorVariable from pymc.logprob.transforms import RVTransform from pymc.pytensorf import compile_pymc, find_rng_nodes, replace_rng_nodes, reseed_rngs diff --git a/pymc/logprob/basic.py b/pymc/logprob/basic.py index 64bd17a18cb..86222fd58a1 100644 --- a/pymc/logprob/basic.py +++ b/pymc/logprob/basic.py @@ -52,7 +52,7 @@ ) from pytensor.graph.op import compute_test_value from pytensor.graph.rewriting.basic import GraphRewriter, NodeRewriter -from pytensor.tensor.var import TensorVariable +from pytensor.tensor.variable import TensorVariable from typing_extensions import TypeAlias from pymc.logprob.abstract import ( diff --git a/pymc/logprob/censoring.py b/pymc/logprob/censoring.py index 123c3394b90..16f19c94afa 100644 --- a/pymc/logprob/censoring.py +++ b/pymc/logprob/censoring.py @@ -45,7 +45,7 @@ from pytensor.scalar.basic import Ceil, Clip, Floor, RoundHalfToEven from pytensor.scalar.basic import clip as scalar_clip from pytensor.tensor.math import ceil, clip, floor, round_half_to_even -from pytensor.tensor.var import TensorConstant +from pytensor.tensor.variable import TensorConstant from pymc.logprob.abstract import MeasurableElemwise, _logcdf, _logprob from pymc.logprob.rewriting import PreserveRVMappings, measurable_ir_rewrites_db diff --git a/pymc/logprob/mixture.py b/pymc/logprob/mixture.py index daa16f520e6..b5c49479371 100644 --- a/pymc/logprob/mixture.py +++ b/pymc/logprob/mixture.py @@ -63,7 +63,7 @@ ) from pytensor.tensor.type import TensorType from pytensor.tensor.type_other import NoneConst, NoneTypeT, SliceConstant, SliceType -from pytensor.tensor.var import TensorVariable +from pytensor.tensor.variable import TensorVariable from pymc.logprob.abstract import ( MeasurableElemwise, diff --git a/pymc/logprob/order.py b/pymc/logprob/order.py index dcd1e1df5f4..f76428f83c6 100644 --- a/pymc/logprob/order.py +++ b/pymc/logprob/order.py @@ -47,7 +47,7 @@ from pytensor.tensor.exceptions import NotScalarConstantError from pytensor.tensor.math import Max from pytensor.tensor.random.op import RandomVariable -from pytensor.tensor.var import TensorVariable +from pytensor.tensor.variable import TensorVariable from pymc.logprob.abstract import ( MeasurableVariable, diff --git a/pymc/logprob/rewriting.py b/pymc/logprob/rewriting.py index aae2099dfb6..7011970221f 100644 --- a/pymc/logprob/rewriting.py +++ b/pymc/logprob/rewriting.py @@ -80,7 +80,7 @@ IncSubtensor, Subtensor, ) -from pytensor.tensor.var import TensorVariable +from pytensor.tensor.variable import TensorVariable from pymc.logprob.abstract import MeasurableVariable from pymc.logprob.utils import DiracDelta, indices_from_subtensor diff --git a/pymc/logprob/scan.py b/pymc/logprob/scan.py index eb0f645051a..283dbd1c3e6 100644 --- a/pymc/logprob/scan.py +++ b/pymc/logprob/scan.py @@ -50,7 +50,7 @@ from pytensor.scan.utils import ScanArgs from pytensor.tensor.random.type import RandomType from pytensor.tensor.subtensor import Subtensor, indices_from_subtensor -from pytensor.tensor.var import TensorVariable +from pytensor.tensor.variable import TensorVariable from pytensor.updates import OrderedUpdates from pymc.logprob.abstract import MeasurableVariable, _logprob diff --git a/pymc/logprob/transforms.py b/pymc/logprob/transforms.py index 30e2318dcc6..588f350fb70 100644 --- a/pymc/logprob/transforms.py +++ b/pymc/logprob/transforms.py @@ -110,7 +110,7 @@ tanh, true_div, ) -from pytensor.tensor.var import TensorVariable +from pytensor.tensor.variable import TensorVariable from pymc.logprob.abstract import ( MeasurableElemwise, diff --git a/pymc/logprob/utils.py b/pymc/logprob/utils.py index bb99e87e263..783b9ad95de 100644 --- a/pymc/logprob/utils.py +++ b/pymc/logprob/utils.py @@ -61,7 +61,7 @@ from pytensor.link.c.type import CType from pytensor.raise_op import CheckAndRaise from pytensor.tensor.random.op import RandomVariable -from pytensor.tensor.var import TensorVariable +from pytensor.tensor.variable import TensorVariable from pymc.logprob.abstract import MeasurableVariable, _logprob from pymc.util import makeiter diff --git a/pymc/model/core.py b/pymc/model/core.py index a32814d767d..2edcb183615 100644 --- a/pymc/model/core.py +++ b/pymc/model/core.py @@ -50,7 +50,7 @@ from pytensor.tensor.random.op import RandomVariable from pytensor.tensor.random.type import RandomType from pytensor.tensor.sharedvar import ScalarSharedVariable -from pytensor.tensor.var import TensorConstant, TensorVariable +from pytensor.tensor.variable import TensorConstant, TensorVariable from typing_extensions import Self from pymc.blocking import DictToArrayBijection, RaveledVars diff --git a/pymc/model_graph.py b/pymc/model_graph.py index 1f3e6d1b895..39d9360aea0 100644 --- a/pymc/model_graph.py +++ b/pymc/model_graph.py @@ -24,7 +24,7 @@ from pytensor.tensor.elemwise import Elemwise from pytensor.tensor.random.op import RandomVariable from pytensor.tensor.shape import Shape -from pytensor.tensor.var import TensorConstant, TensorVariable +from pytensor.tensor.variable import TensorConstant, TensorVariable import pymc as pm diff --git a/pymc/pytensorf.py b/pymc/pytensorf.py index f79f5461f99..8480d0dcfb9 100644 --- a/pymc/pytensorf.py +++ b/pymc/pytensorf.py @@ -60,7 +60,7 @@ from pytensor.tensor.rewriting.shape import ShapeFeature from pytensor.tensor.sharedvar import SharedVariable, TensorSharedVariable from pytensor.tensor.subtensor import AdvancedIncSubtensor, AdvancedIncSubtensor1 -from pytensor.tensor.var import TensorConstant, TensorVariable +from pytensor.tensor.variable import TensorConstant, TensorVariable from pymc.exceptions import NotConstantValueError from pymc.logprob.transforms import RVTransform diff --git a/pymc/variational/approximations.py b/pymc/variational/approximations.py index d271e804485..bac4a9926b1 100644 --- a/pymc/variational/approximations.py +++ b/pymc/variational/approximations.py @@ -20,7 +20,7 @@ from pytensor import tensor as pt from pytensor.graph.basic import Variable from pytensor.graph.replace import graph_replace -from pytensor.tensor.var import TensorVariable +from pytensor.tensor.variable import TensorVariable import pymc as pm diff --git a/requirements-dev.txt b/requirements-dev.txt index ef653c103d3..71aff41b3b5 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -18,7 +18,7 @@ numpydoc pandas>=0.24.0 polyagamma pre-commit>=2.8.0 -pytensor>=2.15.0,<2.16 +pytensor>=2.16.1,<2.17 pytest-cov>=2.5 pytest>=3.0 scipy>=1.4.1 diff --git a/requirements.txt b/requirements.txt index 858da117d9b..0cd2d7201dc 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,6 +4,6 @@ cloudpickle fastprogress>=0.2.0 numpy>=1.15.0 pandas>=0.24.0 -pytensor>=2.15.0,<2.16 +pytensor>=2.16.1,<2.17 scipy>=1.4.1 typing-extensions>=3.7.4 diff --git a/tests/distributions/test_transform.py b/tests/distributions/test_transform.py index 4309b0e5e3f..bc3a5e41b4a 100644 --- a/tests/distributions/test_transform.py +++ b/tests/distributions/test_transform.py @@ -20,7 +20,7 @@ import pytensor.tensor as pt import pytest -from pytensor.tensor.var import TensorConstant +from pytensor.tensor.variable import TensorConstant import pymc as pm import pymc.distributions.transforms as tr diff --git a/tests/model/test_core.py b/tests/model/test_core.py index 33a948c109c..071703f46d2 100644 --- a/tests/model/test_core.py +++ b/tests/model/test_core.py @@ -36,7 +36,7 @@ from pytensor.tensor import TensorVariable from pytensor.tensor.random.op import RandomVariable from pytensor.tensor.sharedvar import ScalarSharedVariable -from pytensor.tensor.var import TensorConstant +from pytensor.tensor.variable import TensorConstant import pymc as pm diff --git a/tests/test_data.py b/tests/test_data.py index 834f698cba2..d75d023ea9d 100644 --- a/tests/test_data.py +++ b/tests/test_data.py @@ -23,7 +23,7 @@ import pytest from pytensor import shared -from pytensor.tensor.var import TensorVariable +from pytensor.tensor.variable import TensorVariable import pymc as pm diff --git a/tests/test_model_graph.py b/tests/test_model_graph.py index 6fadf54a4b9..ab0880fd192 100644 --- a/tests/test_model_graph.py +++ b/tests/test_model_graph.py @@ -19,7 +19,7 @@ import pytest from pytensor.compile.sharedvalue import SharedVariable -from pytensor.tensor.var import TensorConstant +from pytensor.tensor.variable import TensorConstant import pymc as pm diff --git a/tests/test_pytensorf.py b/tests/test_pytensorf.py index 94cf75dc7d3..6582174913f 100644 --- a/tests/test_pytensorf.py +++ b/tests/test_pytensorf.py @@ -32,7 +32,7 @@ from pytensor.tensor.random.var import RandomStateSharedVariable from pytensor.tensor.slinalg import Cholesky from pytensor.tensor.subtensor import AdvancedIncSubtensor, AdvancedIncSubtensor1 -from pytensor.tensor.var import TensorVariable +from pytensor.tensor.variable import TensorVariable import pymc as pm