From 6587125c0a60f5d5cc207fe1e7fc30d5a0c44a6a Mon Sep 17 00:00:00 2001 From: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> Date: Fri, 24 Mar 2023 10:54:06 -0400 Subject: [PATCH] Pin tensorflow-text to go with tensorflow (#22362) * Pin tensorflow-text to go with tensorflow * Make it more convenient to pin TensorFlow * setup don't like f-strings --- examples/tensorflow/_tests_requirements.txt | 2 +- setup.py | 3 ++- src/transformers/dependency_versions_table.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/tensorflow/_tests_requirements.txt b/examples/tensorflow/_tests_requirements.txt index 837ce6d0d1..4548479bcc 100644 --- a/examples/tensorflow/_tests_requirements.txt +++ b/examples/tensorflow/_tests_requirements.txt @@ -1,4 +1,4 @@ -tensorflow<2.11 +tensorflow<2.12 tensorboard scikit-learn seqeval diff --git a/setup.py b/setup.py index 669c8d959c..803535ab53 100644 --- a/setup.py +++ b/setup.py @@ -164,9 +164,10 @@ _deps = [ "starlette", "sudachipy>=0.6.6", "sudachidict_core>=20220729", + # TensorFlow pin. When changing this value, update examples/tensorflow/_tests_requirements.txt accordingly "tensorflow-cpu>=2.4,<2.12", "tensorflow>=2.4,<2.12", - "tensorflow-text", + "tensorflow-text<2.12", "tf2onnx", "timeout-decorator", "timm", diff --git a/src/transformers/dependency_versions_table.py b/src/transformers/dependency_versions_table.py index 7c596c2668..1fbddb013f 100644 --- a/src/transformers/dependency_versions_table.py +++ b/src/transformers/dependency_versions_table.py @@ -72,7 +72,7 @@ deps = { "sudachidict_core": "sudachidict_core>=20220729", "tensorflow-cpu": "tensorflow-cpu>=2.4,<2.12", "tensorflow": "tensorflow>=2.4,<2.12", - "tensorflow-text": "tensorflow-text", + "tensorflow-text": "tensorflow-text<2.12", "tf2onnx": "tf2onnx", "timeout-decorator": "timeout-decorator", "timm": "timm",