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
83d3dc0f
Unverified
Commit
83d3dc0f
authored
Sep 28, 2021
by
Sylvain Gugger
Committed by
GitHub
Sep 28, 2021
Browse files
Fix warning for gradient_checkpointing (#13767)
parent
5e3b4a70
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/configuration_utils.py
src/transformers/configuration_utils.py
+1
-1
No files found.
src/transformers/configuration_utils.py
View file @
83d3dc0f
...
...
@@ -332,7 +332,7 @@ class PretrainedConfig(PushToHubMixin):
self
.
transformers_version
=
kwargs
.
pop
(
"transformers_version"
,
None
)
# Deal with gradient checkpointing
if
kwargs
.
get
(
"gradient_checkpointing"
,
Tru
e
):
if
kwargs
.
get
(
"gradient_checkpointing"
,
Fals
e
):
warnings
.
warn
(
"Passing `gradient_checkpointing` to a config initialization is deprecated and will be removed in v5 "
"Transformers. Using `model.gradient_checkpointing_enable()` instead, or if you are using the "
...
...
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