py-why / dowhy

DoWhy is a Python library for causal inference that supports explicit modeling and testing of causal assumptions. DoWhy is based on a unified language for causal inference, combining causal graphical models and potential outcomes frameworks.
https://www.pywhy.org/dowhy
MIT License
7.01k stars 922 forks source link

added python 3.11 to github actions and pyproject #964

Closed amit-sharma closed 1 year ago

amit-sharma commented 1 year ago

After #963, DoWhy supports python 3.11. Added 3.11 to CI tests and pyproject description for pypi.

amit-sharma commented 1 year ago

The error says, "Unable to find installation candidates for pytorch for 3.11". But the pyproject version specification is >=1.2.1, not sure why it is unable to pick up torch 2.0.1 which does support 3.11.

emrekiciman commented 1 year ago

Does torch 2.0.1 have any dependencies that are incompatible with our other version requirements?

amit-sharma commented 1 year ago

Their requirements are quite simple without any version requirements: https://github.com/pytorch/pytorch/blob/main/pyproject.toml

amit-sharma commented 1 year ago

The dependency conflict is resolved now. But there is an error in GCM. @bloebp can you take a look?

TypeError: The only supported seed types are: None, int, float, str, bytes, and bytearray.

bloebp commented 1 year ago

The dependency conflict is resolved now. But there is an error in GCM. @bloebp can you take a look?

TypeError: The only supported seed types are: None, int, float, str, bytes, and bytearray.

Seems the random seed type changed in 3.11. Will take a look.

amit-sharma commented 1 year ago

Okay, fixed the torch dependency. Needed to specify a separate index_url for torch, which needs poetry >=1.5. So updated the poetry version too.

The only problem: the docker image for the docs build also needs to be updated with the new poetry version. Not sure how to do that. https://github.com/py-why/dowhy/blob/a1c6c042ca5bdfba98063e78b348854cf1709307/docs/Dockerfile#L9 This line needs to be updated too

bloebp commented 1 year ago

Seems the docker container is working now. We really only needed to change the version in the line you referenced :)

amit-sharma commented 1 year ago

wonderful, thanks @bloebp. Can you approve this PR so that I can merge it?