Skip to content

Commit

Permalink
Generate: deprecate old src imports (#28607)
Browse files Browse the repository at this point in the history
  • Loading branch information
gante authored Jan 27, 2024
1 parent a28a769 commit 03cc177
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/transformers/generation_flax_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
2 changes: 1 addition & 1 deletion src/transformers/generation_tf_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
2 changes: 1 addition & 1 deletion src/transformers/generation_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)

0 comments on commit 03cc177

Please sign in to comment.