Skip to content

Commit

Permalink
format code
Browse files Browse the repository at this point in the history
  • Loading branch information
techkang committed Oct 25, 2024
1 parent 8ca8c4d commit 1eab209
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/transformers/training_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -1776,11 +1776,13 @@ def __post_init__(self):
if self.average_tokens_across_devices:
try:
if self.world_size == 1:
logger.warning('average_tokens_across_devices is set to True but it is invalid when world size is'
'1. Turn it to False automatically.')
logger.warning(
"average_tokens_across_devices is set to True but it is invalid when world size is"
"1. Turn it to False automatically."
)
self.average_tokens_across_devices = False
except ImportError as e:
logger.warning(f'Can not specify world size due to {e}. Turn average_tokens_across_devices to False.')
logger.warning(f"Can not specify world size due to {e}. Turn average_tokens_across_devices to False.")
self.average_tokens_across_devices = False

if self.torchdynamo is not None:
Expand Down

0 comments on commit 1eab209

Please sign in to comment.