Skip to content

Commit

Permalink
correction for get rank id. (k2-fsa#507)
Browse files Browse the repository at this point in the history
* Fix no attribute 'data' error.

* minor fixes

* correction for get rank id.
  • Loading branch information
TeaPoly authored Jul 29, 2022
1 parent ec69967 commit 34b4356
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions icefall/dist.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ def get_rank():
if "RANK" in os.environ:
return int(os.environ["RANK"])
elif dist.is_available() and dist.is_initialized():
return dist.rank()
return dist.get_rank()
else:
return 1
return 0


def get_local_rank():
Expand Down

0 comments on commit 34b4356

Please sign in to comment.