Skip to content

Commit a29212e

Browse files
committed
fix
1 parent 9e2d5f4 commit a29212e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/torchrunx/launcher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ def index(self, hostname: str, rank: int) -> Any:
278278

279279
def rank(self, i: int) -> Any:
280280
"""Get return value from worker by global rank."""
281-
return self.by_rank()[i]
281+
return self.by_ranks()[i]
282282

283283

284284
def _resolve_hostnames(hostnames: list[str] | Literal["auto", "slurm"]) -> list[str]:

tests/test_func.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def test_launch() -> None:
1313
workers_per_host="slurm",
1414
)
1515

16-
result_values = result.by_rank()
16+
result_values = result.by_ranks()
1717

1818
t = True
1919
for i in range(len(result_values)):

0 commit comments

Comments
 (0)