Skip to content

Commit cf08650

Browse files
committed
Check docstrings
1 parent 2120796 commit cf08650

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pytorch_toolbelt/utils/catalyst/utils.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1+
from typing import Dict
2+
13
import torch
24

35
__all__ = ["clean_checkpoint", "report_checkpoint"]
46

5-
from catalyst.dl import Callback, CallbackOrder, RunnerState
6-
77

88
def clean_checkpoint(src_fname, dst_fname):
99
"""
10-
Removes optimizer, scheduler and criterion states from checkpoint
10+
Remove optimizer, scheduler and criterion states from checkpoint
1111
:param src_fname: Source checkpoint filename
1212
:param dst_fname: Target checkpoint filename (can be same)
1313
"""
@@ -22,9 +22,9 @@ def clean_checkpoint(src_fname, dst_fname):
2222
torch.save(checkpoint, dst_fname)
2323

2424

25-
def report_checkpoint(checkpoint):
25+
def report_checkpoint(checkpoint: Dict):
2626
"""
27-
Prints checkpoint metrics & epoch
27+
Print checkpoint metrics and epoch number
2828
:param checkpoint:
2929
"""
3030
print("Epoch :", checkpoint["epoch"])

0 commit comments

Comments
 (0)