Skip to content

Commit

Permalink
Fix exception handling in get_all_ranks_from_group() function
Browse files Browse the repository at this point in the history
  • Loading branch information
HeyangQin committed Dec 22, 2023
1 parent 827e1ca commit 5e0e384
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deepspeed/comm/comm.py
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ def get_all_ranks_from_group(group=None):
while True:
group_ranks.append(cdb.get_global_rank(group, rank))
rank += 1
except RuntimeError:
except (RuntimeError, ValueError):
pass
return group_ranks

Expand Down

0 comments on commit 5e0e384

Please sign in to comment.