[FIX BUG] convert env param to int in (#5934)

pull/5936/head
Gao, Ruiyuan 2024-07-24 10:30:40 +08:00 committed by GitHub
parent a521ffc9f8
commit 5fb958cc83
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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: