Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@roomrys
Copy link
Contributor

@roomrys roomrys commented Sep 14, 2023

Description

In an effort to get sleap-io and sleap in the same environment, we would like the dependencies to line up. This PR remove the pin from imagio.

imageio is a dependency of a dependency and not directly used in the sleap source code

In fact, this PR removes listing imageio as a dependency at all - although it is still pulled in as a dependency of a dependency.

Types of changes

  • Bugfix
  • New feature
  • Refactor / Code style update (no logical changes)
  • Build / CI changes
  • Documentation Update
  • Other (dependencies)

Does this address any currently open issues?

[list open issues here]

Outside contributors checklist

  • Review the guidelines for contributing to this repository
  • Read and sign the CLA and add yourself to the authors list
  • Make sure you are making a pull request against the develop branch (not main). Also you should start your branch off develop
  • Add tests that prove your fix is effective or that your feature works
  • Add necessary documentation (if appropriate)

Thank you for contributing to SLEAP!

❤️

Summary by CodeRabbit


  • Chore: Updated dependencies in pypi_requirements.txt. Removed the imageio package and added the imgaug package with a specific version constraint. Also, updated the version constraint for the scipy package. These changes are part of ongoing efforts to keep our software up-to-date and secure. Please update your environment accordingly.

@roomrys
Copy link
Contributor Author

roomrys commented Sep 14, 2023

I've manually tested the wheel by creating the following environment on Windows/Linux:

mamba create -c conda-forge pip python=3.7.12 cudatoolkit=11.3 cudnn=8.2 -n <env_name>

and then

mamba activate <env_name>
pip cache purge
pip install .[pypi]

The GPUs are automatically detected on Windows, but on Linux, we need to set the LD_LIBRARY_PATHS to detect the GPUs:

mkdir -p $CONDA_PREFIX/etc/conda/activate.d
echo '#!/bin/sh' >> $CONDA_PREFIX/etc/conda/activate.d/sleap_activate.sh
echo 'export LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH' >> $CONDA_PREFIX/etc/conda/activate.d/sleap_activate.sh
source $CONDA_PREFIX/etc/conda/activate.d/sleap_activate.sh

Training and inference have both run successfully on both Windows and Linux. The wheel is successfully running training/inference on Colab:
https://colab.research.google.com/drive/1L0cW_uG-Qv3qy30jTXBB8fsuiXzeQTAq?usp=sharing

Linux environment

pip freeze
absl-py==1.4.0
astunparse==1.6.3
attrs==21.4.0
backports.zoneinfo==0.2.1
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.5.4
google-auth==2.23.0
google-auth-oauthlib==0.4.6
google-pasta==0.2.0
grpcio==1.58.0
h5py==3.8.0
hdmf==3.6.1
idna==3.4
image-classifiers==1.0.0
imageio==2.31.2
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.8.0
Keras-Applications==1.0.8
Keras-Preprocessing==1.1.2
kiwisolver==1.4.5
libclang==16.0.6
Markdown==3.3.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.11
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 @ file:///home/talmolab/sleap-estimates-animal-poses/pull-requests/sleap
tensorboard==2.8.0
tensorboard-data-server==0.6.1
tensorboard-plugin-wit==1.8.1
tensorflow==2.8.4
tensorflow-estimator==2.8.0
tensorflow-hub==0.14.0
tensorflow-io-gcs-filesystem==0.34.0
termcolor==2.3.0
threadpoolctl==3.1.0
tifffile==2021.11.2
typing_extensions==4.7.1
tzlocal==5.0.1
urllib3==1.26.16
Werkzeug==2.2.3
wrapt==1.15.0
zipp==3.15.0
micromamba list
  Name              Version    Build                 Channel    
──────────────────────────────────────────────────────────────────
  _libgcc_mutex     0.1        conda_forge           conda-forge
  _openmp_mutex     4.5        2_gnu                 conda-forge
  ca-certificates   2023.7.22  hbcca054_0            conda-forge
  cudatoolkit       11.3.1     hb98b00a_12           conda-forge
  cudnn             8.2.1.32   h86fa8c9_0            conda-forge
  ld_impl_linux-64  2.40       h41732ed_0            conda-forge
  libffi            3.4.2      h7f98852_5            conda-forge
  libgcc-ng         13.2.0     h807b86a_0            conda-forge
  libgomp           13.2.0     h807b86a_0            conda-forge
  libnsl            2.0.0      h7f98852_0            conda-forge
  libsqlite         3.43.0     h2797004_0            conda-forge
  libstdcxx-ng      13.2.0     h7e041cc_0            conda-forge
  libzlib           1.2.13     hd590300_5            conda-forge
  ncurses           6.4        hcb278e6_0            conda-forge
  openssl           3.1.2      hd590300_0            conda-forge
  pip               23.2.1     pyhd8ed1ab_0          conda-forge
  python            3.7.12     hf930737_100_cpython  conda-forge
  readline          8.2        h8228510_1            conda-forge
  setuptools        68.2.2     pyhd8ed1ab_0          conda-forge
  sqlite            3.43.0     h2c6b66d_0            conda-forge
  tk                8.6.12     h27826a3_0            conda-forge
  wheel             0.41.2     pyhd8ed1ab_0          conda-forge
  xz                5.2.6      h166bdaf_0            conda-forge

Windows environment

mamba list

@roomrys roomrys requested a review from talmo September 14, 2023 21:50
@roomrys roomrys marked this pull request as ready for review September 14, 2023 21:50
@coderabbitai
Copy link

coderabbitai bot commented Sep 14, 2023

Walkthrough

This change primarily involves package updates in the pypi_requirements.txt file. The imageio package has been removed, and the imgaug package has been added. Additionally, the version constraint for the scipy package has been updated.

Changes

File Summary
pypi_requirements.txt Removed imageio, added imgaug with version constraint, and updated scipy version constraint

🐇

"In the land of code, where the shadows lie,

An update comes, under the digital sky.

Packages old, bid us goodbye,

New ones arrive, ready to comply.

With every change, we aim to fly,

In the quest for software, that's ever spry!" 🚀


Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • Mention @coderabbitai in any review comment for bot assistance.
  • Note: Review comments are made on code diffs or files, not on the PR overview.

Pause Incremental Reviews

  • Insert @coderabbitai: ignore in the PR description to halt the bot's ongoing reviews. Remove the line to resume.

Copy link

@coderabbitai coderabbitai bot left a 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

Commits Files that changed from the base of the PR and between 6eed6d9 and 101b7b9 commits.
Files selected for processing (1)
  • pypi_requirements.txt (1 hunks)
Files skipped from review due to trivial changes (1)
  • pypi_requirements.txt

Copy link
Collaborator

@talmo talmo left a comment

Choose a reason for hiding this comment

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

I was under the impression it might be used for single-image reading, but I see now we're just doing that with OpenCV.

Dropping imageio is ok with me if you've tested it!

@roomrys roomrys merged commit c033f85 into develop Sep 14, 2023
@roomrys roomrys deleted the liezl/remove-imageio-pin branch September 14, 2023 23:14
roomrys added a commit that referenced this pull request Sep 15, 2023
* Do not try to remove item if already deleted (#1498)

* Set `LD_LIBRARY_PATH` on `mamba activate` (#1496)

* Add version restrictions to tensorflow for pypi (#1485)

* Remove `imageio` pin (#1501)

* Reset LD_LIBRARY_PATH on deactivate (#1502)

* Brown bag bump to 1.3.3 (#1484)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants