From cbd278f0f663275e180120f0d3478e3d1bb2039a Mon Sep 17 00:00:00 2001 From: Matt Date: Thu, 19 Oct 2023 14:39:31 +0100 Subject: [PATCH] Pin Keras for now (#26904) * Pin Keras for now out of paranoia * Add the keras pin to _tests_requirements.txt too * Make sure the Keras version matches the TF one * make fixup --- examples/tensorflow/_tests_requirements.txt | 1 + setup.py | 2 ++ src/transformers/dependency_versions_table.py | 1 + 3 files changed, 4 insertions(+) diff --git a/examples/tensorflow/_tests_requirements.txt b/examples/tensorflow/_tests_requirements.txt index 989bda33028c16..e9351b2b422091 100644 --- a/examples/tensorflow/_tests_requirements.txt +++ b/examples/tensorflow/_tests_requirements.txt @@ -1,4 +1,5 @@ tensorflow<2.15 +keras<2.15 tensorboard scikit-learn seqeval diff --git a/setup.py b/setup.py index 444efbf268d1b6..c737058cb8695e 100644 --- a/setup.py +++ b/setup.py @@ -125,6 +125,8 @@ "jaxlib>=0.4.1,<=0.4.13", "jieba", "kenlm", + # Keras pin - this is to make sure Keras 3 doesn't destroy us. Remove or change when we have proper support. + "keras<2.15", "keras-nlp>=0.3.1", "librosa", "nltk", diff --git a/src/transformers/dependency_versions_table.py b/src/transformers/dependency_versions_table.py index 20dacb3cf0d4e1..4b3e32bc04b32f 100644 --- a/src/transformers/dependency_versions_table.py +++ b/src/transformers/dependency_versions_table.py @@ -32,6 +32,7 @@ "jaxlib": "jaxlib>=0.4.1,<=0.4.13", "jieba": "jieba", "kenlm": "kenlm", + "keras": "keras<2.15", "keras-nlp": "keras-nlp>=0.3.1", "librosa": "librosa", "nltk": "nltk",