Skip to content

Commit 2ae2d4d

Browse files
authored
Speed up pip install keras-nlp; simplify deps (#697)
We will transitively depend on tensorflow through tensorflow-text, to avoid pip slowly looking for a dependency match. We will also simplify our extra dependencies, so they no longer include dev environment tooling and BERT pre-training deps. These will be handle via requirements files.
1 parent c21f852 commit 2ae2d4d

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

setup.py

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -38,27 +38,17 @@
3838
"absl-py",
3939
"numpy",
4040
"packaging",
41-
# Don't require tensorflow on MacOS; tensorflow-macos will not
42-
# satisfy the requirement.
43-
"tensorflow; platform_system != 'Darwin'",
41+
# Don't require tensorflow-text on MacOS, there are no binaries for ARM.
42+
# Also, we rely on tensorflow *transitively* through tensorflow-text.
43+
# This avoid a slowdown during `pip install keras-nlp` where pip would
44+
# download many version of both libraries to find compatible versions.
4445
"tensorflow-text; platform_system != 'Darwin'",
4546
],
4647
extras_require={
47-
"tests": [
48-
"black",
49-
"flake8",
50-
"isort",
51-
"pytest",
52-
"pytest-cov",
48+
"extras": [
5349
"rouge-score",
5450
"sentencepiece",
5551
],
56-
"examples": [
57-
"tensorflow_datasets", # For GLUE in BERT example.
58-
"nltk",
59-
"wikiextractor",
60-
"keras-tuner",
61-
],
6252
},
6353
# Supported Python versions
6454
python_requires=">=3.8",

0 commit comments

Comments
 (0)