Unverified Commit 03cc1777 authored by Joao Gante's avatar Joao Gante Committed by GitHub
Browse files

Generate: deprecate old src imports (#28607)

parent a28a7699
...@@ -23,6 +23,6 @@ class FlaxGenerationMixin(FlaxGenerationMixin): ...@@ -23,6 +23,6 @@ class FlaxGenerationMixin(FlaxGenerationMixin):
# warning at import time # warning at import time
warnings.warn( warnings.warn(
"Importing `FlaxGenerationMixin` from `src/transformers/generation_flax_utils.py` is deprecated and will " "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, FutureWarning,
) )
...@@ -23,6 +23,6 @@ class TFGenerationMixin(TFGenerationMixin): ...@@ -23,6 +23,6 @@ class TFGenerationMixin(TFGenerationMixin):
# warning at import time # warning at import time
warnings.warn( warnings.warn(
"Importing `TFGenerationMixin` from `src/transformers/generation_tf_utils.py` is deprecated and will " "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, FutureWarning,
) )
...@@ -23,6 +23,6 @@ class GenerationMixin(GenerationMixin): ...@@ -23,6 +23,6 @@ class GenerationMixin(GenerationMixin):
# warning at import time # warning at import time
warnings.warn( warnings.warn(
"Importing `GenerationMixin` from `src/transformers/generation_utils.py` is deprecated and will " "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, FutureWarning,
) )
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment