Unverified Commit d5c2c71c authored by Charlie-Bell's avatar Charlie-Bell Committed by GitHub
Browse files

Changed world_size() to get_world_size() bugfix (#22381)

Edited one line in src/transormers/generation/utils.py. Changed dist.world_size() to dist.get_world_size() since world_size() doesn't exist in pytorch.dist.
parent c746eb16
...@@ -1193,7 +1193,7 @@ class GenerationMixin: ...@@ -1193,7 +1193,7 @@ class GenerationMixin:
""" """
if synced_gpus is None: if synced_gpus is None:
if is_deepspeed_zero3_enabled() and dist.world_size() > 1: if is_deepspeed_zero3_enabled() and dist.get_world_size() > 1:
synced_gpus = True synced_gpus = True
else: else:
synced_gpus = False synced_gpus = False
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment