pymc-devs / pymc

Bayesian Modeling and Probabilistic Programming in Python
https://docs.pymc.io/
Other
8.67k stars 2k forks source link

Bump PyTensor dependency and drop support for python 3.9 #7227

Closed ricardoV94 closed 6 months ago

ricardoV94 commented 6 months ago

Description

Related Issue

Checklist

Type of change


πŸ“š Documentation preview πŸ“š: https://pymc--7227.org.readthedocs.build/en/7227/

ricardoV94 commented 6 months ago

Did you miss the python_requires line in setup.py?

There is also python_version in mypy.ini and tool.ruff.target-version in pyproject.toml but this will make pre-commit unhappy so I am happy to clean these up in another PR

Thanks, updated it.

ricardoV94 commented 6 months ago

@Armavica do you want to update the mypy / pre-commit version? Feel free to push to this branch

ricardoV94 commented 6 months ago

Seems like something is broken :D

Armavica commented 6 months ago

Yes, I don't really understand what… I tried a few of the tests that fail here and they work on my machine, and I don't really understand this mamba error on pre-commit either

ricardoV94 commented 6 months ago

Are you running with the newer Pytensor?

Armavica commented 6 months ago

Are you running with the newer Pytensor?

Ok I can reproduce now :man_facepalming:

ricardoV94 commented 6 months ago

I'll try and fix next week, probably my fault anyway :)

maresb commented 6 months ago

We should switch to setup-micromamba. I did that recently but I forget where.

Armavica commented 6 months ago

here probably? https://github.com/pymc-devs/pymc/pull/7213

maresb commented 6 months ago

Ah ya, thanks! That's the one!

ricardoV94 commented 6 months ago

Tests are passing now, except mypy installation failing.

@maresb what should we do, re-release PyTensor and combine this PR with #7213 ?

ricardoV94 commented 6 months ago

This is the error:

  LibMambaUnsatisfiableError: Encountered problems while solving:
    - package pytensor-2.20.0-py310hc6cd4ac_0 requires python >=3.10,<3.11.0a0, but none of the providers can be installed

  Could not solve for environment specs
  The following packages are incompatible
  β”œβ”€ pytensor >=2.20,<2.21  is installable with the potential options
  β”‚  β”œβ”€ pytensor 2.20.0 would require
  β”‚  β”‚  β”œβ”€ python >=3.10,<3.11.0a0 , which can be installed;
  β”‚  β”‚  └─ python_abi 3.10.* *_cp310, which can be installed;
  β”‚  β”œβ”€ pytensor 2.20.0 would require
  β”‚  β”‚  β”œβ”€ python >=3.11,<3.12.0a0 , which can be installed;
  β”‚  β”‚  └─ python_abi 3.11.* *_cp311, which can be installed;
  β”‚  └─ pytensor 2.20.0 would require
  β”‚     └─ python_abi 3.12.* *_cp312, which can be installed;
  └─ python 3.9**  is not installable because there are no viable options
     β”œβ”€ python [3.9.0|3.9.1|...|3.9.7] conflicts with any installable versions previously reported;
     └─ python [3.9.0|3.9.1|...|3.9.9] would require
        └─ python_abi 3.9.* *_cp39, which conflicts with any installable versions previously reported.

  LibMambaUnsatisfiableError: Encountered problems while solving:
    - package pytensor-2.20.0-py310hc6cd4ac_0 requires python >=3.10,<3.11.0a0, but none of the providers can be installed

  Could not solve for environment specs
  The following packages are incompatible
  β”œβ”€ pytensor >=2.20,<2.21  is installable with the potential options
  β”‚  β”œβ”€ pytensor 2.20.0 would require
  β”‚  β”‚  β”œβ”€ python >=3.10,<3.11.0a0 , which can be installed;
  β”‚  β”‚  └─ python_abi 3.10.* *_cp310, which can be installed;
  β”‚  β”œβ”€ pytensor 2.20.0 would require
  β”‚  β”‚  β”œβ”€ python >=3.11,<3.12.0a0 , which can be installed;
  β”‚  β”‚  └─ python_abi 3.11.* *_cp311, which can be installed;
  β”‚  └─ pytensor 2.20.0 would require
  β”‚     └─ python_abi 3.12.* *_cp312, which can be installed;
  └─ python 3.9**  is not installable because there are no viable options
     β”œβ”€ python [3.9.0|3.9.1|...|3.9.7] conflicts with any installable versions previously reported;
     └─ python [3.9.0|3.9.1|...|3.9.9] would require
        └─ python_abi 3.9.* *_cp39, which conflicts with any installable versions previously reported.

What is restricted to 3.9?

ricardoV94 commented 6 months ago

Ah I think we just need to tweak the python version in the pre-commit workflow

ricardoV94 commented 6 months ago

Tests are passing