Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
03cc1777
Unverified
Commit
03cc1777
authored
Jan 27, 2024
by
Joao Gante
Committed by
GitHub
Jan 27, 2024
Browse files
Generate: deprecate old src imports (#28607)
parent
a28a7699
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
src/transformers/generation_flax_utils.py
src/transformers/generation_flax_utils.py
+1
-1
src/transformers/generation_tf_utils.py
src/transformers/generation_tf_utils.py
+1
-1
src/transformers/generation_utils.py
src/transformers/generation_utils.py
+1
-1
No files found.
src/transformers/generation_flax_utils.py
View file @
03cc1777
...
@@ -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 v
5
. Import as `from transformers import FlaxGenerationMixin` instead."
,
"be removed in Transformers v
4.40
. Import as `from transformers import FlaxGenerationMixin` instead."
,
FutureWarning
,
FutureWarning
,
)
)
src/transformers/generation_tf_utils.py
View file @
03cc1777
...
@@ -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 v
5
. Import as `from transformers import TFGenerationMixin` instead."
,
"be removed in Transformers v
4.40
. Import as `from transformers import TFGenerationMixin` instead."
,
FutureWarning
,
FutureWarning
,
)
)
src/transformers/generation_utils.py
View file @
03cc1777
...
@@ -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 v
5
. Import as `from transformers import GenerationMixin` instead."
,
"be removed in Transformers v
4.40
. Import as `from transformers import GenerationMixin` instead."
,
FutureWarning
,
FutureWarning
,
)
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment