Skip to content

Commit

Permalink
get_fs_local_rank
Browse files Browse the repository at this point in the history
  • Loading branch information
玄钛 committed Feb 18, 2024
1 parent 6765317 commit 5de468b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion olmo/torch_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def get_fs_local_rank() -> int:
if all ranks share the same filesystem then `get_fs_local_rank()` will be equivalent to `get_global_rank()`,
but if nodes do not share the same filesystem then `get_fs_local_rank()` will be equivalent to `get_local_rank()`.
"""
return int(os.environ.get("FS_LOCAL_RANK") or get_local_rank())
return int(os.environ.get("FS_LOCAL_RANK") or get_global_rank())


def move_to_device(o: T, device: torch.device) -> T:
Expand Down

0 comments on commit 5de468b

Please sign in to comment.