mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-09 10:02:22 +00:00
correction for get rank id. (#507)
* Fix no attribute 'data' error. * minor fixes * correction for get rank id.
This commit is contained in:
parent
ec69967584
commit
34b4356bad
@ -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():
|
||||
|
Loading…
x
Reference in New Issue
Block a user