Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def load_independent(files: list[str], device: str):
"""Before-PR behavior: every rank reads every tensor from disk to GPU."""
for st_file in files:
with safe_open(st_file, framework="pt", device=device) as f:
for name in f:
for name in f.keys(): # noqa: SIM118
param = f.get_tensor(name)
yield name, param

Expand All @@ -54,7 +54,7 @@ def load_broadcast(files: list[str], device: str, node_group,
handles = []
for st_file in files:
with safe_open(st_file, framework="pt", device=device) as f:
for name in f:
for name in f.keys(): # noqa: SIM118
if local_rank == 0:
param = f.get_tensor(name)
else:
Expand Down
Loading