Skip to content

Commit fe409a1

Browse files
committed
Remove unused function
1 parent 5d8f499 commit fe409a1

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

biapy/utils/misc.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -427,13 +427,6 @@ def get_checkpoint_path(cfg, jobname):
427427

428428
return resume
429429

430-
431-
def save_state_dict_safetensors(model: torch.nn.Module, path: str, metadata: Dict[str, str] = None):
432-
from safetensors.torch import save_file
433-
state = model.state_dict()
434-
# state must be a dict[str, Tensor]
435-
save_file(state, path, metadata=metadata or {})
436-
437430
def load_model_checkpoint(cfg, jobname, model_without_ddp, device, optimizer=None, just_extract_checkpoint_info=False, skip_unmatched_layers=False):
438431
"""
439432
Load a model checkpoint from disk.

0 commit comments

Comments
 (0)