"...git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "4bf97415a450c97e0fcbc615dcc8dd9f14b749b4"
Unverified Commit e00bc7cd authored by Sylvain Gugger's avatar Sylvain Gugger Committed by GitHub
Browse files

Silence warning in gradient checkpointing when it's False (#13734)

parent 3ffd18a6
......@@ -332,7 +332,7 @@ class PretrainedConfig(PushToHubMixin):
self.transformers_version = kwargs.pop("transformers_version", None)
# Deal with gradient checkpointing
if "gradient_checkpointing" in kwargs:
if kwargs.get("gradient_checkpointing", True):
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 "
......
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