From 03cc17775b961d16cc4d0d7ab0c8487120d0b708 Mon Sep 17 00:00:00 2001 From: Joao Gante Date: Sat, 27 Jan 2024 15:54:19 +0000 Subject: [PATCH] Generate: deprecate old src imports (#28607) --- src/transformers/generation_flax_utils.py | 2 +- src/transformers/generation_tf_utils.py | 2 +- src/transformers/generation_utils.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/transformers/generation_flax_utils.py b/src/transformers/generation_flax_utils.py index 8cb3ad5873c4a6..6e96a1ac5ad21b 100644 --- a/src/transformers/generation_flax_utils.py +++ b/src/transformers/generation_flax_utils.py @@ -23,6 +23,6 @@ class FlaxGenerationMixin(FlaxGenerationMixin): # warning at import time warnings.warn( "Importing `FlaxGenerationMixin` from `src/transformers/generation_flax_utils.py` is deprecated and will " - "be removed in Transformers v5. Import as `from transformers import FlaxGenerationMixin` instead.", + "be removed in Transformers v4.40. Import as `from transformers import FlaxGenerationMixin` instead.", FutureWarning, ) diff --git a/src/transformers/generation_tf_utils.py b/src/transformers/generation_tf_utils.py index 8aadd95e690d2e..cf7cb2e32047ac 100644 --- a/src/transformers/generation_tf_utils.py +++ b/src/transformers/generation_tf_utils.py @@ -23,6 +23,6 @@ class TFGenerationMixin(TFGenerationMixin): # warning at import time warnings.warn( "Importing `TFGenerationMixin` from `src/transformers/generation_tf_utils.py` is deprecated and will " - "be removed in Transformers v5. Import as `from transformers import TFGenerationMixin` instead.", + "be removed in Transformers v4.40. Import as `from transformers import TFGenerationMixin` instead.", FutureWarning, ) diff --git a/src/transformers/generation_utils.py b/src/transformers/generation_utils.py index 31cff9749463d9..cc269ee77b0538 100644 --- a/src/transformers/generation_utils.py +++ b/src/transformers/generation_utils.py @@ -23,6 +23,6 @@ class GenerationMixin(GenerationMixin): # warning at import time warnings.warn( "Importing `GenerationMixin` from `src/transformers/generation_utils.py` is deprecated and will " - "be removed in Transformers v5. Import as `from transformers import GenerationMixin` instead.", + "be removed in Transformers v4.40. Import as `from transformers import GenerationMixin` instead.", FutureWarning, )