fix typo examples/community/roberta (#3925)

This commit is contained in:
digger yu
2023-06-08 14:28:34 +08:00
committed by GitHub
parent e417dd004e
commit 407aa48461
8 changed files with 12 additions and 12 deletions

View File

@@ -97,7 +97,7 @@ def throughput_calculator(numel, args, config, iteration_time, total_iterations,
def synchronize():
if not torch.distributed.is_available():
return
if not torch.distributed.is_intialized():
if not torch.distributed.is_initialized():
return
world_size = torch.distributed.get_world_size()
if world_size == 1:

View File

@@ -110,7 +110,7 @@ class Timers:
"""Write timers to a tensorboard writer"""
# currently when using add_scalars,
# torch.utils.add_scalars makes each timer its own run, which
# polutes the runs list, so we just add each as a scalar
# pollutes the runs list, so we just add each as a scalar
assert normalizer > 0.0
for name in names:
value = self.timers[name].elapsed(reset=reset) / normalizer