diff --git a/parakeet/training/chekpoint.py b/parakeet/training/checkpoint.py similarity index 96% rename from parakeet/training/chekpoint.py rename to parakeet/training/checkpoint.py index 8a5fe4f..155261d 100644 --- a/parakeet/training/chekpoint.py +++ b/parakeet/training/checkpoint.py @@ -58,8 +58,8 @@ class KBest(object): def __init__(self, max_size: int=5, - save_fn: Callable=None, - del_fn: Callable=lambda f: f.unlink()): + save_fn: Callable[[Path], None]=None, + del_fn: Callable[[Path], None]=lambda f: f.unlink()): self.best_records: Mapping[Path, float] = {} self.save_fn = save_fn self.del_fn = del_fn diff --git a/tests/test_checkpoint.py b/tests/test_checkpoint.py index 45137d5..af8df02 100644 --- a/tests/test_checkpoint.py +++ b/tests/test_checkpoint.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from parakeet.training.chekpoint import KBest +from parakeet.training.checkpoint import KBest import numpy as np from pathlib import Path import shutil