mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-04-27 11:31:58 +00:00
[FIX BUG] convert env param to int in (#5934)
This commit is contained in:
parent
a521ffc9f8
commit
5fb958cc83
@ -44,7 +44,7 @@ class DistCoordinator(metaclass=SingletonMeta):
|
||||
self._rank = dist.get_rank()
|
||||
self._world_size = dist.get_world_size()
|
||||
# this is often passed by launchers such as torchrun
|
||||
self._local_rank = os.environ.get("LOCAL_RANK", -1)
|
||||
self._local_rank = int(os.environ.get("LOCAL_RANK", -1))
|
||||
|
||||
@property
|
||||
def rank(self) -> int:
|
||||
|
Loading…
Reference in New Issue
Block a user