Skip to content

Commit 598323e

Browse files
committed
fix format ci error
1 parent e1e0ec5 commit 598323e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

checkpoint_engine/ps.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ def _to_named_tensor(metas: list[ParameterMeta], offset: int = 0) -> list[dict]:
148148
return ret
149149

150150

151-
def _load_checkpoint_file(file_path: str) -> tuple[int, dict[str, tuple['FileMeta', torch.Tensor]]]:
152-
def _safetensors_load(fn: str) -> dict[str, tuple['FileMeta', torch.Tensor]]:
151+
def _load_checkpoint_file(file_path: str) -> tuple[int, dict[str, tuple["FileMeta", torch.Tensor]]]:
152+
def _safetensors_load(fn: str) -> dict[str, tuple["FileMeta", torch.Tensor]]:
153153
ret = {}
154154
with safe_open(fn, framework="pt") as f:
155155
for name in f.keys(): # noqa: SIM118
@@ -165,7 +165,7 @@ def _safetensors_load(fn: str) -> dict[str, tuple['FileMeta', torch.Tensor]]:
165165
return ret
166166

167167
# deprecated, will be removed in the future
168-
def _fast_np_load(fn: str) -> dict[str, tuple['FileMeta', torch.Tensor]]:
168+
def _fast_np_load(fn: str) -> dict[str, tuple["FileMeta", torch.Tensor]]:
169169
"""load *.np file and return memmap and related tensor meta"""
170170

171171
def parse_npy_header(fin: BinaryIO) -> dict[str, Any]:

0 commit comments

Comments
 (0)