-
Notifications
You must be signed in to change notification settings - Fork 101
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
Add version restrictions to tensorflow for pypi #1485
Conversation
WalkthroughThe changes primarily focus on updating and refining the project's dependencies in Changes
TipsChat with CodeRabbit Bot (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Files selected for processing (1)
- pypi_requirements.txt (1 hunks)
Additional comments (Suppressed): 4
pypi_requirements.txt (4)
34-35: The version constraints for
tensorflow
have been updated to handle different platforms and machine types. Ensure that these changes do not introduce any compatibility issues with other parts of the codebase that usetensorflow
.36-36: The version constraint for
tensorflow-hub
has been updated. Verify if this change is compatible with the rest of the project.37-38:
tensorflow-macos
andtensorflow-metal
are new dependencies added specifically for macOS arm64 machines. Make sure that these additions do not cause any conflicts or issues on other platforms.42-43: A new dependency on Protobuf has been added due to requirements from
tensorboard
andtensorflow
. This could potentially lead to version conflicts if other parts of the project depend on a different version of Protobuf. Please verify this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Windows 10 w/ tensorflow 2.10The windows pypi package fails on inference and yields:
I think we will have to give instructions for finding the Full Traceback
pip freezeabsl-py==1.4.0
astunparse==1.6.3
attrs==21.4.0
backports.zoneinfo==0.2.1
cached-property==1.5.2
cachetools==5.3.1
cattrs==1.1.1
certifi==2023.7.22
charset-normalizer==3.2.0
colorama==0.4.6
commonmark==0.9.1
cycler==0.11.0
efficientnet==1.0.0
flatbuffers==23.5.26
fonttools==4.38.0
gast==0.4.0
google-auth==2.23.0
google-auth-oauthlib==0.4.6
google-pasta==0.2.0
grpcio==1.58.0
h5py==3.1.0
hdmf==3.6.1
idna==3.4
image-classifiers==1.0.0
imageio==2.15.0
imgaug==0.4.0
imgstore==0.2.9
importlib-metadata==4.2.0
importlib-resources==5.12.0
joblib==1.3.2
jsmin==3.0.1
jsonpickle==1.2
jsonschema==4.17.3
keras==2.10.0
Keras-Applications==1.0.8
Keras-Preprocessing==1.1.2
kiwisolver==1.4.5
libclang==16.0.6
Markdown==3.4.4
MarkupSafe==2.1.3
matplotlib==3.5.3
ndx-pose==0.1.1
networkx==2.6.3
nixio==1.5.3
numpy==1.21.6
oauthlib==3.2.2
opencv-python==4.5.5.64
opt-einsum==3.3.0
packaging==23.1
pandas==1.3.5
Pillow==8.4.0
pkgutil-resolve-name==1.3.10
protobuf==3.19.6
psutil==5.9.5
pyasn1==0.5.0
pyasn1-modules==0.3.0
Pygments==2.16.1
pykalman==0.9.5
pynwb==2.3.3
pyparsing==3.1.1
pyrsistent==0.19.3
PySide2==5.14.1
python-dateutil==2.8.2
python-rapidjson==1.10
pytz==2023.3.post1
PyWavelets==1.3.0
PyYAML==6.0.1
pyzmq==25.1.1
qimage2ndarray==1.10.0
QtPy==2.4.0
requests==2.31.0
requests-oauthlib==1.3.1
rich==10.16.1
rsa==4.9
ruamel.yaml==0.17.32
ruamel.yaml.clib==0.2.7
scikit-image==0.19.3
scikit-learn==1.0.2
scikit-video==1.1.11
scipy==1.7.3
seaborn==0.12.2
segmentation-models==1.0.1
shapely==2.0.1
shiboken2==5.14.1
six==1.16.0
sleap==1.3.2
tensorboard==2.10.1
tensorboard-data-server==0.6.1
tensorboard-plugin-wit==1.8.1
tensorflow==2.10.1
tensorflow-estimator==2.10.0
tensorflow-hub==0.14.0
tensorflow-io-gcs-filesystem==0.31.0
termcolor==2.3.0
threadpoolctl==3.1.0
tifffile==2021.11.2
typing-extensions==4.7.1
tzdata==2023.3
tzlocal==5.0.1
urllib3==1.26.16
Werkzeug==2.2.3
wrapt==1.15.0
zipp==3.15.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was able to get inference working on Windows by downgrading to mamba create -y -c conda-forge -c nvidia pip python=3.7.12 cudatoolkit=11.3.1 cudnn=8.2.1 cuda-nvcc=11.3 -n env0 and excluding mamba create -y -c conda-forge -c nvidia pip python=3.7.12 cudatoolkit=11.3.1 cudnn=8.2.1 -n env1 then pip installed into those environments. Both environments worked, but excluding
I also ran conda list# Name Version Build Channel
absl-py 1.4.0 pypi_0 pypi
astunparse 1.6.3 pypi_0 pypi
attrs 21.4.0 pypi_0 pypi
backports-zoneinfo 0.2.1 pypi_0 pypi
ca-certificates 2023.7.22 h56e8100_0 conda-forge
cached-property 1.5.2 pypi_0 pypi
cachetools 5.3.1 pypi_0 pypi
cattrs 1.1.1 pypi_0 pypi
certifi 2023.7.22 pypi_0 pypi
charset-normalizer 3.2.0 pypi_0 pypi
colorama 0.4.6 pypi_0 pypi
commonmark 0.9.1 pypi_0 pypi
cuda-nvcc 11.3.58 hb8d16a4_0 nvidia
cudatoolkit 11.3.1 hf2f0253_12 conda-forge
cudnn 8.2.1.32 h754d62a_0 conda-forge
cycler 0.11.0 pypi_0 pypi
efficientnet 1.0.0 pypi_0 pypi
flatbuffers 23.5.26 pypi_0 pypi
fonttools 4.38.0 pypi_0 pypi
gast 0.5.4 pypi_0 pypi
google-auth 2.23.0 pypi_0 pypi
google-auth-oauthlib 0.4.6 pypi_0 pypi
google-pasta 0.2.0 pypi_0 pypi
grpcio 1.58.0 pypi_0 pypi
h5py 3.1.0 pypi_0 pypi
hdmf 3.6.1 pypi_0 pypi
idna 3.4 pypi_0 pypi
image-classifiers 1.0.0 pypi_0 pypi
imageio 2.15.0 pypi_0 pypi
imgaug 0.4.0 pypi_0 pypi
imgstore 0.2.9 pypi_0 pypi
importlib-metadata 4.2.0 pypi_0 pypi
importlib-resources 5.12.0 pypi_0 pypi
joblib 1.3.2 pypi_0 pypi
jsmin 3.0.1 pypi_0 pypi
jsonpickle 1.2 pypi_0 pypi
jsonschema 4.17.3 pypi_0 pypi
keras 2.8.0 pypi_0 pypi
keras-applications 1.0.8 pypi_0 pypi
keras-preprocessing 1.1.2 pypi_0 pypi
kiwisolver 1.4.5 pypi_0 pypi
libclang 16.0.6 pypi_0 pypi
libsqlite 3.43.0 hcfcfb64_0 conda-forge
markdown 3.3.4 pypi_0 pypi
markupsafe 2.1.3 pypi_0 pypi
matplotlib 3.5.3 pypi_0 pypi
ndx-pose 0.1.1 pypi_0 pypi
networkx 2.6.3 pypi_0 pypi
nixio 1.5.3 pypi_0 pypi
numpy 1.21.6 pypi_0 pypi
oauthlib 3.2.2 pypi_0 pypi
opencv-python 4.5.5.64 pypi_0 pypi
openssl 3.1.2 hcfcfb64_0 conda-forge
opt-einsum 3.3.0 pypi_0 pypi
packaging 23.1 pypi_0 pypi
pandas 1.3.5 pypi_0 pypi
pillow 8.4.0 pypi_0 pypi
pip 23.2.1 pyhd8ed1ab_0 conda-forge
pkgutil-resolve-name 1.3.10 pypi_0 pypi
protobuf 3.19.6 pypi_0 pypi
psutil 5.9.5 pypi_0 pypi
pyasn1 0.5.0 pypi_0 pypi
pyasn1-modules 0.3.0 pypi_0 pypi
pygments 2.16.1 pypi_0 pypi
pykalman 0.9.5 pypi_0 pypi
pynwb 2.3.3 pypi_0 pypi
pyparsing 3.1.1 pypi_0 pypi
pyrsistent 0.19.3 pypi_0 pypi
pyside2 5.14.1 pypi_0 pypi
python 3.7.12 h900ac77_100_cpython conda-forge
python-dateutil 2.8.2 pypi_0 pypi
python-rapidjson 1.10 pypi_0 pypi
pytz 2023.3.post1 pypi_0 pypi
pywavelets 1.3.0 pypi_0 pypi
pyyaml 6.0.1 pypi_0 pypi
pyzmq 25.1.1 pypi_0 pypi
qimage2ndarray 1.10.0 pypi_0 pypi
qtpy 2.4.0 pypi_0 pypi
requests 2.31.0 pypi_0 pypi
requests-oauthlib 1.3.1 pypi_0 pypi
rich 10.16.1 pypi_0 pypi
rsa 4.9 pypi_0 pypi
ruamel-yaml 0.17.32 pypi_0 pypi
ruamel-yaml-clib 0.2.7 pypi_0 pypi
scikit-image 0.19.3 pypi_0 pypi
scikit-learn 1.0.2 pypi_0 pypi
scikit-video 1.1.11 pypi_0 pypi
scipy 1.7.3 pypi_0 pypi
seaborn 0.12.2 pypi_0 pypi
segmentation-models 1.0.1 pypi_0 pypi
setuptools 68.2.2 pyhd8ed1ab_0 conda-forge
shapely 2.0.1 pypi_0 pypi
shiboken2 5.14.1 pypi_0 pypi
six 1.16.0 pypi_0 pypi
sleap 1.3.2 pypi_0 pypi
sqlite 3.43.0 hcfcfb64_0 conda-forge
tensorboard 2.8.0 pypi_0 pypi
tensorboard-data-server 0.6.1 pypi_0 pypi
tensorboard-plugin-wit 1.8.1 pypi_0 pypi
tensorflow 2.8.4 pypi_0 pypi
tensorflow-estimator 2.8.0 pypi_0 pypi
tensorflow-hub 0.14.0 pypi_0 pypi
tensorflow-io-gcs-filesystem 0.31.0 pypi_0 pypi
termcolor 2.3.0 pypi_0 pypi
threadpoolctl 3.1.0 pypi_0 pypi
tifffile 2021.11.2 pypi_0 pypi
typing-extensions 4.7.1 pypi_0 pypi
tzdata 2023.3 pypi_0 pypi
tzlocal 5.0.1 pypi_0 pypi
ucrt 10.0.22621.0 h57928b3_0 conda-forge
urllib3 1.26.16 pypi_0 pypi
vc 14.3 h64f974e_17 conda-forge
vc14_runtime 14.36.32532 hdcecf7f_17 conda-forge
vs2015_runtime 14.36.32532 h05e6639_17 conda-forge
werkzeug 2.2.3 pypi_0 pypi
wheel 0.41.2 pyhd8ed1ab_0 conda-forge
wrapt 1.15.0 pypi_0 pypi
zipp 3.15.0 pypi_0 pypi I also ran mamba create -y -c conda-forge pip python=3.7.12 -n env2 and was able to run training/inference without utilizing the GPU. conda list# Name Version Build Channel
absl-py 1.4.0 pypi_0 pypi
astunparse 1.6.3 pypi_0 pypi
attrs 21.4.0 pypi_0 pypi
backports-zoneinfo 0.2.1 pypi_0 pypi
ca-certificates 2023.7.22 h56e8100_0 conda-forge
cached-property 1.5.2 pypi_0 pypi
cachetools 5.3.1 pypi_0 pypi
cattrs 1.1.1 pypi_0 pypi
certifi 2023.7.22 pypi_0 pypi
charset-normalizer 3.2.0 pypi_0 pypi
colorama 0.4.6 pypi_0 pypi
commonmark 0.9.1 pypi_0 pypi
cycler 0.11.0 pypi_0 pypi
efficientnet 1.0.0 pypi_0 pypi
flatbuffers 23.5.26 pypi_0 pypi
fonttools 4.38.0 pypi_0 pypi
gast 0.5.4 pypi_0 pypi
google-auth 2.23.0 pypi_0 pypi
google-auth-oauthlib 0.4.6 pypi_0 pypi
google-pasta 0.2.0 pypi_0 pypi
grpcio 1.58.0 pypi_0 pypi
h5py 3.1.0 pypi_0 pypi
hdmf 3.6.1 pypi_0 pypi
idna 3.4 pypi_0 pypi
image-classifiers 1.0.0 pypi_0 pypi
imageio 2.15.0 pypi_0 pypi
imgaug 0.4.0 pypi_0 pypi
imgstore 0.2.9 pypi_0 pypi
importlib-metadata 4.2.0 pypi_0 pypi
importlib-resources 5.12.0 pypi_0 pypi
joblib 1.3.2 pypi_0 pypi
jsmin 3.0.1 pypi_0 pypi
jsonpickle 1.2 pypi_0 pypi
jsonschema 4.17.3 pypi_0 pypi
keras 2.8.0 pypi_0 pypi
keras-applications 1.0.8 pypi_0 pypi
keras-preprocessing 1.1.2 pypi_0 pypi
kiwisolver 1.4.5 pypi_0 pypi
libclang 16.0.6 pypi_0 pypi
libsqlite 3.43.0 hcfcfb64_0 conda-forge
markdown 3.3.4 pypi_0 pypi
markupsafe 2.1.3 pypi_0 pypi
matplotlib 3.5.3 pypi_0 pypi
ndx-pose 0.1.1 pypi_0 pypi
networkx 2.6.3 pypi_0 pypi
nixio 1.5.3 pypi_0 pypi
numpy 1.21.6 pypi_0 pypi
oauthlib 3.2.2 pypi_0 pypi
opencv-python 4.5.5.64 pypi_0 pypi
openssl 3.1.2 hcfcfb64_0 conda-forge
opt-einsum 3.3.0 pypi_0 pypi
packaging 23.1 pypi_0 pypi
pandas 1.3.5 pypi_0 pypi
pillow 8.4.0 pypi_0 pypi
pip 23.2.1 pyhd8ed1ab_0 conda-forge
pkgutil-resolve-name 1.3.10 pypi_0 pypi
protobuf 3.19.6 pypi_0 pypi
psutil 5.9.5 pypi_0 pypi
pyasn1 0.5.0 pypi_0 pypi
pyasn1-modules 0.3.0 pypi_0 pypi
pygments 2.16.1 pypi_0 pypi
pykalman 0.9.5 pypi_0 pypi
pynwb 2.3.3 pypi_0 pypi
pyparsing 3.1.1 pypi_0 pypi
pyrsistent 0.19.3 pypi_0 pypi
pyside2 5.14.1 pypi_0 pypi
python 3.7.12 h900ac77_100_cpython conda-forge
python-dateutil 2.8.2 pypi_0 pypi
python-rapidjson 1.10 pypi_0 pypi
pytz 2023.3.post1 pypi_0 pypi
pywavelets 1.3.0 pypi_0 pypi
pyyaml 6.0.1 pypi_0 pypi
pyzmq 25.1.1 pypi_0 pypi
qimage2ndarray 1.10.0 pypi_0 pypi
qtpy 2.4.0 pypi_0 pypi
requests 2.31.0 pypi_0 pypi
requests-oauthlib 1.3.1 pypi_0 pypi
rich 10.16.1 pypi_0 pypi
rsa 4.9 pypi_0 pypi
ruamel-yaml 0.17.32 pypi_0 pypi
ruamel-yaml-clib 0.2.7 pypi_0 pypi
scikit-image 0.19.3 pypi_0 pypi
scikit-learn 1.0.2 pypi_0 pypi
scikit-video 1.1.11 pypi_0 pypi
scipy 1.7.3 pypi_0 pypi
seaborn 0.12.2 pypi_0 pypi
segmentation-models 1.0.1 pypi_0 pypi
setuptools 68.2.2 pyhd8ed1ab_0 conda-forge
shapely 2.0.1 pypi_0 pypi
shiboken2 5.14.1 pypi_0 pypi
six 1.16.0 pypi_0 pypi
sleap 1.3.2 pypi_0 pypi
sqlite 3.43.0 hcfcfb64_0 conda-forge
tensorboard 2.8.0 pypi_0 pypi
tensorboard-data-server 0.6.1 pypi_0 pypi
tensorboard-plugin-wit 1.8.1 pypi_0 pypi
tensorflow 2.8.4 pypi_0 pypi
tensorflow-estimator 2.8.0 pypi_0 pypi
tensorflow-hub 0.14.0 pypi_0 pypi
tensorflow-io-gcs-filesystem 0.31.0 pypi_0 pypi
termcolor 2.3.0 pypi_0 pypi
threadpoolctl 3.1.0 pypi_0 pypi
tifffile 2021.11.2 pypi_0 pypi
typing-extensions 4.7.1 pypi_0 pypi
tzdata 2023.3 pypi_0 pypi
tzlocal 5.0.1 pypi_0 pypi
ucrt 10.0.22621.0 h57928b3_0 conda-forge
urllib3 1.26.16 pypi_0 pypi
vc 14.3 h64f974e_17 conda-forge
vc14_runtime 14.36.32532 hdcecf7f_17 conda-forge
vs2015_runtime 14.36.32532 h05e6639_17 conda-forge
werkzeug 2.2.3 pypi_0 pypi
wheel 0.41.2 pyhd8ed1ab_0 conda-forge
wrapt 1.15.0 pypi_0 pypi
zipp 3.15.0 pypi_0 pypi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seeing as the virtual environments still have access to the conda installed libraries... I am redoing some tests on Linux: Environment with
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Files selected for processing (1)
- pypi_requirements.txt (2 hunks)
Additional comments (Suppressed): 5
pypi_requirements.txt (5)
13-13: The version constraint for
numpy
is well defined, ensuring compatibility with other packages.22-23: Good use of platform-specific constraints for the
python-rapidjson
package to address the Microsoft Visual C++ requirement on Windows.35-36: Ensure that all parts of the codebase that use
tensorflow
andtensorflow-hub
are compatible with the specified version ranges.38-39: These lines add support for Apple Silicon machines by including
tensorflow-macos
andtensorflow-metal
dependencies. However, as mentioned in the comment, these dependencies are untested. It would be beneficial to test these dependencies to ensure they work as expected on Apple Silicon machines.46-46: Adding a version constraint to
protobuf
due to compatibility requirements withtensorboard
andtensorflow
is a good practice. However, it's important to verify that this version constraint doesn't cause conflicts with other packages that depend onprotobuf
.
The latest commit is running training/inference successfully on colab! |
Description
Add version restrictions to tensorflow for pypi extra. While the conda packages for 1.3.2 were not affected (since
tensorflow
is pulled in from anaconda), the PyPI only package installed viapip install sleap[pypi]
had conflicts between the version oftensorflow
and the version ofkeras
.Types of changes
Does this address any currently open issues?
tensorflow==2.13
version incompatible insleap[pypi]==1.3.2
#1495Outside contributors checklist
Thank you for contributing to SLEAP!
❤️
Summary by CodeRabbit
requirements.txt
to ensure compatibility across different platforms and machine types.python-rapidjson
to address a Microsoft Visual C++ requirement error on Windows.tensorflow-macos
andtensorflow-metal
dependencies.tensorflow
,tensorflow-hub
,urllib3
,google-auth
, andprotobuf
to maintain compatibility and stability.