mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-09 01:52:41 +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:
|
if "RANK" in os.environ:
|
||||||
return int(os.environ["RANK"])
|
return int(os.environ["RANK"])
|
||||||
elif dist.is_available() and dist.is_initialized():
|
elif dist.is_available() and dist.is_initialized():
|
||||||
return dist.rank()
|
return dist.get_rank()
|
||||||
else:
|
else:
|
||||||
return 1
|
return 0
|
||||||
|
|
||||||
|
|
||||||
def get_local_rank():
|
def get_local_rank():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user