Reduce verbosity for average_tokens_across_devices=True and world size = 1 (#38785)

* Warning to info for average_tokens_across_devices and world size = 1

* Update src/transformers/training_args.py
This commit is contained in:
Quentin Gallouédec 2025-06-12 14:02:53 +02:00 committed by GitHub
parent 89c46b648d
commit 960fda25d1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1762,9 +1762,8 @@ class TrainingArguments:
if self.average_tokens_across_devices: if self.average_tokens_across_devices:
try: try:
if self.world_size == 1: if self.world_size == 1:
logger.warning( logger.info(
"average_tokens_across_devices is set to True but it is invalid when world size is" "average_tokens_across_devices is True but world size is 1. Setting it to False automatically."
"1. Turn it to False automatically."
) )
self.average_tokens_across_devices = False self.average_tokens_across_devices = False
except ImportError as e: except ImportError as e: