Better warning

This commit is contained in:
Lysandre
2020-06-09 19:08:27 -04:00
parent 6342e803a9
commit 513ba3b6a0
+2 -2
View File
@@ -59,7 +59,7 @@ class PretrainedConfig(object):
if "output_attentions" in kwargs:
warnings.warn(
"The `output_attentions` in the configuration is deprecated and will be removed in a later version. "
"Please use `output_attention` as an argument to your model instead.",
"Please use `output_attention` as an argument to your model's foward method instead.",
FutureWarning,
)
self.output_attentions = kwargs.pop("output_attentions", False)
@@ -298,7 +298,7 @@ class PretrainedConfig(object):
if "output_attentions" in kwargs:
warnings.warn(
"The `output_attentions` in the configuration is deprecated and will be removed in a later version. "
"Please use `output_attention` as an argument to your model instead.",
"Please use `output_attention` as an argument to your model's forward method instead.",
FutureWarning,
)