Skip to content
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

Remove h5py<3 constraint as not needed for TF>2.5.0 #3301

Merged
merged 6 commits into from Dec 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/gen-workflow-ci.py
Expand Up @@ -505,6 +505,7 @@ def build_and_test_macos(id: str, name: str, needs: List[str], attempts: int = 3
f'\n'
f' python -m pip install -U pip\n'
f' pip install tensorflow==${{TENSORFLOW}} keras==${{KERAS}}\n'
f' if [[ ${{TENSORFLOW}} == 1.* ]] || [[ ${{TENSORFLOW}} == 2.[012345].* ]]; then pip install "h5py<3"; fi\n'
f' pip install torch==${{PYTORCH}} pytorch_lightning==${{PYTORCH_LIGHTNING}} torchvision==${{TORCHVISION}}\n'
f' pip install mxnet==${{MXNET}}\n'
f' HOROVOD_WITH_TENSORFLOW=1 HOROVOD_WITH_PYTORCH=1 HOROVOD_WITH_MXNET=1 pip install --no-cache-dir .[test]\n'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci.yaml
Expand Up @@ -3415,6 +3415,7 @@ jobs:

python -m pip install -U pip
pip install tensorflow==${TENSORFLOW} keras==${KERAS}
if [[ ${TENSORFLOW} == 1.* ]] || [[ ${TENSORFLOW} == 2.[012345].* ]]; then pip install "h5py<3"; fi
pip install torch==${PYTORCH} pytorch_lightning==${PYTORCH_LIGHTNING} torchvision==${TORCHVISION}
pip install mxnet==${MXNET}
HOROVOD_WITH_TENSORFLOW=1 HOROVOD_WITH_PYTORCH=1 HOROVOD_WITH_MXNET=1 pip install --no-cache-dir .[test]
Expand Down
3 changes: 1 addition & 2 deletions Dockerfile.test.cpu
Expand Up @@ -140,7 +140,7 @@ RUN if [[ ${MPI_KIND} != "None" ]]; then \
RUN if [[ ${TENSORFLOW_PACKAGE} != "tf-nightly" ]]; then \
pip install --no-cache-dir ${TENSORFLOW_PACKAGE}; \
if [[ ${KERAS_PACKAGE} != "None" ]]; then \
if [[ ${TENSORFLOW_PACKAGE} == tensorflow*==1.* ]] || [[ ${TENSORFLOW_PACKAGE} == tensorflow*==2.[01234].* ]]; then \
if [[ ${TENSORFLOW_PACKAGE} == tensorflow*==1.* ]] || [[ ${TENSORFLOW_PACKAGE} == tensorflow*==2.[012345].* ]]; then \
h5py="h5py<3"; \
fi; \
pip uninstall -y keras-nightly; \
Expand Down Expand Up @@ -186,7 +186,6 @@ COPY . /horovod
# Install nightly packages here so they do not get cached

# Install TensorFlow and Keras (nightly).
# Do not pin h5py since tf>=2.5 requires h5py~=3.1
# Pin scipy!=1.4.0: https://github.com/scipy/scipy/issues/11237
RUN if [[ ${TENSORFLOW_PACKAGE} == "tf-nightly" ]]; then \
pip install --no-cache-dir ${TENSORFLOW_PACKAGE}; \
Expand Down
3 changes: 1 addition & 2 deletions Dockerfile.test.gpu
Expand Up @@ -108,7 +108,7 @@ RUN if [[ ${MPI_KIND} != "None" ]]; then \
RUN if [[ ${TENSORFLOW_PACKAGE} != "tf-nightly-gpu" ]]; then \
pip install --no-cache-dir ${TENSORFLOW_PACKAGE}; \
if [[ ${KERAS_PACKAGE} != "None" ]]; then \
if [[ ${TENSORFLOW_PACKAGE} == tensorflow*==1.* ]] || [[ ${TENSORFLOW_PACKAGE} == tensorflow*==2.[01234].* ]]; then \
if [[ ${TENSORFLOW_PACKAGE} == tensorflow*==1.* ]] || [[ ${TENSORFLOW_PACKAGE} == tensorflow*==2.[012345].* ]]; then \
h5py="h5py<3"; \
fi; \
pip uninstall -y keras-nightly; \
Expand Down Expand Up @@ -155,7 +155,6 @@ COPY . /horovod
# Install nightly packages here so they do not get cached

# Install TensorFlow and Keras (nightly).
# Do not pin h5py since tf>=2.5 requires h5py~=3.1
# Pin scipy!=1.4.0: https://github.com/scipy/scipy/issues/11237
RUN if [[ ${TENSORFLOW_PACKAGE} == "tf-nightly-gpu" ]]; then \
pip install --no-cache-dir ${TENSORFLOW_PACKAGE}; \
Expand Down
6 changes: 2 additions & 4 deletions setup.py
Expand Up @@ -124,8 +124,7 @@ def build_extensions(self):
mxnet_require_list = ['mxnet>=1.4.1']
pyspark_require_list = ['pyspark>=2.3.2;python_version<"3.8"',
'pyspark>=3.0.0;python_version>="3.8"']
# Pin h5py: https://github.com/h5py/h5py/issues/1732
spark_require_list = ['h5py<3', 'numpy', 'petastorm>=0.11.0', 'pyarrow>=0.15.0', 'fsspec']
spark_require_list = ['numpy', 'petastorm>=0.11.0', 'pyarrow>=0.15.0', 'fsspec']
# https://github.com/ray-project/ray/pull/17465
ray_require_list = ['ray', 'aioredis<2']
pytorch_spark_require_list = pytorch_require_list + \
Expand Down Expand Up @@ -154,8 +153,7 @@ def build_extensions(self):
# torchvision 0.5.0 depends on torch==1.4.0

# python packages required only to run tests
# Pin h5py: https://github.com/h5py/h5py/issues/1732
test_require_list = ['mock', 'pytest', 'pytest-forked', 'parameterized', 'h5py<3']
test_require_list = ['mock', 'pytest', 'pytest-forked', 'parameterized']

# Skip cffi if pytorch extension explicitly disabled
if not os.environ.get('HOROVOD_WITHOUT_PYTORCH'):
Expand Down