Skip to content

Commit 41e6614

Browse files
pak-lauratensorflower-gardener
authored andcommitted
Push upper and lower limits of python deps for the open source people who might have a different version of the dep that still works. Dep versions are still pinned in CI
PiperOrigin-RevId: 400270872 Change-Id: Ibf2818764b402b99e637c7624f3af435e78b48b0
1 parent a7daef8 commit 41e6614

File tree

1 file changed

+24
-23
lines changed

1 file changed

+24
-23
lines changed

tensorflow/tools/pip_package/setup.py

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@
6060
sys.argv.pop(project_name_idx)
6161

6262

63-
# All versions of TF need these packages. We use the `~=` syntax to pin packages
64-
# to the latest major.minor release accepting all other patches on top of that.
65-
# If we already know of a patched version, we pin to that.
63+
# All versions of TF need these packages. We indicate the widest possible range
64+
# of package releases possible to be as up-to-date as possible as well as to
65+
# accomodate as many pre-installed packages as possible.
6666
# For packages that don't have yet a stable release, we pin using `~= 0.x` which
6767
# means we accept any `0.y` version (y >= x) but not the first major release. We
6868
# will need additional testing for that.
@@ -74,25 +74,25 @@
7474
# NOTE: As numpy has releases that break semver guarantees and several other
7575
# deps depend on numpy without an upper bound, we must install numpy before
7676
# everything else.
77-
'numpy ~= 1.19.2',
77+
'numpy >= 1.14.5', # keras 2.6 needs 1.19.2, h5py needs 1.14.5 for py37
7878
# Install other dependencies
79-
'absl-py ~= 0.10',
80-
'astunparse ~= 1.6.3',
81-
'libclang ~= 11.1.0',
82-
'flatbuffers ~= 2.0',
83-
'google_pasta ~= 0.2',
84-
'h5py ~= 3.1.0',
85-
'keras_preprocessing ~= 1.1.2',
86-
'opt_einsum ~= 3.3.0',
79+
'absl-py >= 0.4.0',
80+
'astunparse >= 1.6.0',
81+
'libclang >= 9.0.1',
82+
'flatbuffers >= 1.12, < 3.0', # capped as jax 0.1.71 needs < 3.0
83+
'google_pasta >= 0.1.1',
84+
'h5py >= 2.9.0', # capped since 3.3.0 lacks py3.6
85+
'keras_preprocessing >= 1.1.1', # 1.1.0 needs tensorflow==1.7
86+
'opt_einsum >= 2.3.2', # sphinx pin not removed up til 3.3.0 release
8787
'protobuf >= 3.9.2',
88-
'six ~= 1.15.0',
89-
'termcolor ~= 1.1.0',
90-
'typing_extensions ~= 3.7.4',
91-
'wheel ~= 0.35',
92-
'wrapt ~= 1.12.1',
88+
'six >= 1.12.0',
89+
'termcolor >= 1.1.0',
90+
'typing_extensions >= 3.6.6',
91+
'wheel >= 0.32.0, < 1.0', # capped as astunparse 1.6.0-1.6.3 requires < 1.0
92+
'wrapt >= 1.11.0',
9393
# These packages need to be pinned exactly as newer versions are
9494
# incompatible with the rest of the ecosystem
95-
'gast == 0.4.0',
95+
'gast >= 0.2.1, < 0.5.0', # TODO(lpak): if this breaks, revert to 0.4.0
9696
# TensorFlow ecosystem packages that TF exposes API for
9797
# These need to be in sync with the existing TF version
9898
# They are updated during the release process
@@ -123,17 +123,18 @@
123123
# BoringSSL support.
124124
# See https://github.com/tensorflow/tensorflow/issues/17882.
125125
if sys.byteorder == 'little':
126-
REQUIRED_PACKAGES.append('grpcio >= 1.37.0, < 2.0')
126+
REQUIRED_PACKAGES.append('grpcio >= 1.24.3, < 2.0')
127127

128128

129129
# Packages which are only needed for testing code.
130130
# Please don't add test-only packages to `REQUIRED_PACKAGES`!
131131
# Follows the same conventions as `REQUIRED_PACKAGES`
132132
TEST_PACKAGES = [
133-
'portpicker ~= 1.3.1',
134-
'scipy ~= 1.5.2',
135-
'tblib ~= 1.7.0',
136-
'dill ~= 0.3.2',
133+
'portpicker >= 1.3.1',
134+
'scipy ~= 1.5.2, < 1.7', # NOTE: capped due to py3.6 and opt-einsum requires
135+
# sphinx==1.2.3 but scipy 1.7.1 requires sphinx >= 2.4.0, <3.1.0
136+
'tblib >= 1.4.0',
137+
'dill >= 0.2.9',
137138
]
138139

139140

0 commit comments

Comments
 (0)