From dc9040dd4d89230e821a9bf019c2d6ad5a5bfe14 Mon Sep 17 00:00:00 2001 From: chenfeiyu Date: Thu, 10 Jun 2021 02:45:45 +0800 Subject: [PATCH] fix typos --- parakeet/training/{chekpoint.py => checkpoint.py} | 4 ++-- tests/test_checkpoint.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) rename parakeet/training/{chekpoint.py => checkpoint.py} (96%) 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