ENH: upgraded allowed TF versions - #316
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the dependency versions for TensorFlow and tf_keras in both pyproject.toml and requirements.txt. The reviewer suggests maintaining upper bounds on the TensorFlow version to ensure long-term stability and prevent potential breaking changes from future major releases, providing a specific code suggestion for the pyproject.toml file.
Coverage Report for Python 3.10
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Coverage Report for Python 3.12
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Coverage Report for Python 3.11
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request updates the dependency versions for tensorflow, tensorflow-probability, and tf_keras in both pyproject.toml and requirements.txt, introducing environment-specific constraints for Python 3.9 and Python 3.10+. The review feedback highlights critical version incompatibilities between the requested tensorflow and tensorflow-probability versions. Specifically, tensorflow >= 2.18 requires tensorflow-probability >= 0.25, and tensorflow-probability == 0.23 requires at least tensorflow 2.15. It is recommended to align these versions to prevent runtime errors and ensure environment stability.
| "tensorflow >=2.18; python_version > '3.9'", | ||
| "tensorflow <2.16; python_version < '3.10'", | ||
| "tensorflow-probability >=0.23; python_version > '3.9'", | ||
| "tensorflow-probability ==0.23; python_version < '3.10'", |
There was a problem hiding this comment.
The tensorflow-probability (TFP) version is strictly tied to the tensorflow (TF) version.
- For Python 3.10+ (where
tensorflow >= 2.18is requested), you should usetensorflow-probability >= 0.25.0. TFP 0.23 is incompatible with TF 2.18 and will likely cause import or runtime errors. - For Python 3.9 (where
tensorflow < 2.16is requested), pinningtensorflow-probability == 0.23requirestensorflow >= 2.15.0. If the resolver picks an older version like TF 2.14 (which was previously supported), it will fail because TFP 0.23 requires TF 2.15.
It is recommended to align these versions and maintain the previous lower bound for TF on Python 3.9 to ensure compatibility.
| "tensorflow >=2.18; python_version > '3.9'", | |
| "tensorflow <2.16; python_version < '3.10'", | |
| "tensorflow-probability >=0.23; python_version > '3.9'", | |
| "tensorflow-probability ==0.23; python_version < '3.10'", | |
| "tensorflow >=2.18; python_version > '3.9'", | |
| "tensorflow >=2.15, <2.16; python_version < '3.10'", | |
| "tensorflow-probability >=0.25; python_version > '3.9'", | |
| "tensorflow-probability ==0.23; python_version < '3.10'", |
| tensorflow>=2.18; python_version > '3.9' | ||
| tensorflow<2.16; python_version < '3.10' | ||
| tensorflow_probability>=0.23; python_version > '3.9' | ||
| tensorflow_probability==0.23; python_version < '3.10' |
There was a problem hiding this comment.
The tensorflow-probability versions specified here are likely to cause compatibility issues with the requested tensorflow versions.
- TF 2.18 (Python 3.10+) requires TFP 0.25.0.
- TFP 0.23 (Python 3.9) requires at least TF 2.15.0.
Please align the versions to ensure environment stability and avoid runtime ImportError or version mismatch warnings.
tensorflow>=2.18; python_version > '3.9'
tensorflow>=2.15, <2.16; python_version < '3.10'
tensorflow_probability>=0.25; python_version > '3.9'
tensorflow_probability==0.23; python_version < '3.10'
No description provided.