fix: The 'warn' method is deprecated (#11105)

* The 'warn' method is deprecated

* fix test
This commit is contained in:
Stas Bekman
2021-04-07 06:20:06 -07:00
committed by GitHub
parent 247bed3857
commit c9035e4537
52 changed files with 68 additions and 66 deletions

View File

@@ -394,7 +394,7 @@ def main():
padding = "max_length" if data_args.pad_to_max_length else False
if training_args.label_smoothing_factor > 0 and not hasattr(model, "prepare_decoder_input_ids_from_labels"):
logger.warn(
logger.warning(
"label_smoothing is enabled but the `prepare_decoder_input_ids_from_labels` method is not defined for"
f"`{model.__class__.__name__}`. This will lead to loss being calculated twice and will take up more memory"
)