Unverified Commit c9fd4985 authored by Tomoko Uchida's avatar Tomoko Uchida Committed by GitHub
Browse files

Fix 'local_rank' AttiributeError in Trainer class (#24297)

fix attribute error
parent 850cf4af
......@@ -3250,7 +3250,7 @@ class Trainer:
elif is_sagemaker_mp_enabled():
tensors = smp_gather(tensors)
elif (self.args.distributed_state is not None and self.args.distributed_state.distributed_type != "NO") or (
self.args.distributed_state is None and self.local_rank != -1
self.args.distributed_state is None and self.args.local_rank != -1
):
tensors = distributed_concat(tensors)
return tensors
......
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