Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump PyTensor dependency #6531

Merged
merged 3 commits into from
Feb 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,6 @@ jobs:
- name: Install external samplers
run: |
conda activate pymc-test
conda install -c conda-forge nutpie
pip install "numpyro>=0.8.0"
pip install git+https://github.com/blackjax-devs/blackjax.git@0.7.0
- name: Run tests
Expand Down
2 changes: 1 addition & 1 deletion conda-envs/environment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dependencies:
- numpy>=1.15.0
- pandas>=0.24.0
- pip
- pytensor=2.9.1
- pytensor=2.10.1
- python-graphviz
- networkx
- scipy>=1.4.1
Expand Down
2 changes: 1 addition & 1 deletion conda-envs/environment-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dependencies:
- numpy>=1.15.0
- pandas>=0.24.0
- pip
- pytensor=2.9.1
- pytensor=2.10.1
- python-graphviz
- networkx
- scipy>=1.4.1
Expand Down
2 changes: 1 addition & 1 deletion conda-envs/windows-environment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dependencies:
- numpy>=1.15.0
- pandas>=0.24.0
- pip
- pytensor=2.9.1
- pytensor=2.10.1
- python-graphviz
- networkx
- scipy>=1.4.1
Expand Down
2 changes: 1 addition & 1 deletion conda-envs/windows-environment-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dependencies:
- numpy>=1.15.0
- pandas>=0.24.0
- pip
- pytensor=2.9.1
- pytensor=2.10.1
- python-graphviz
- networkx
- scipy>=1.4.1
Expand Down
2 changes: 0 additions & 2 deletions pymc/distributions/shape_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -759,8 +759,6 @@ def get_support_shape(
for inferred, explicit in zip(inferred_support_shape, support_shape)
]

# Workaround https://github.com/pymc-devs/pytensor/issues/193 typing bug in stack signature
inferred_support_shape = cast(Sequence[TensorVariable], inferred_support_shape)
return at.stack(inferred_support_shape)


Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ numpydoc
pandas>=0.24.0
polyagamma
pre-commit>=2.8.0
pytensor==2.9.1
pytensor==2.10.1
pytest-cov>=2.5
pytest>=3.0
scipy>=1.4.1
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ cloudpickle
fastprogress>=0.2.0
numpy>=1.15.0
pandas>=0.24.0
pytensor==2.9.1
pytensor==2.10.1
scipy>=1.4.1
typing-extensions>=3.7.4
7 changes: 3 additions & 4 deletions tests/sampling/test_mcmc_external.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,15 @@

from pymc import Model, Normal, sample

pytest.importorskip("nutpie")
pytest.importorskip("blackjax")
pytest.importorskip("numpyro")

# turns all warnings into errors for this module
pytestmark = pytest.mark.filterwarnings("error")


@pytest.mark.parametrize("nuts_sampler", ["pymc", "nutpie", "blackjax", "numpyro"])
def test_external_nuts_sampler(recwarn, nuts_sampler):
if nuts_sampler != "pymc":
pytest.importorskip(nuts_sampler)
Comment on lines +26 to +27
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked this works as expected and skips only the parametrization that fails to import, not all of them afterwards. Can be seen in the CI as well: https://github.com/pymc-devs/pymc/actions/runs/4282342784/jobs/7456497043#step:8:79


with Model():
Normal("x")

Expand Down