Skip to content
This repository was archived by the owner on Dec 16, 2022. It is now read-only.

Commit 24519fd

Browse files
authored
fix typehint on checkpointer method (#4726)
1 parent d3c69f7 commit 24519fd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

allennlp/training/checkpointer.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Union, Dict, Any, List, Tuple
1+
from typing import Union, Dict, Any, List, Tuple, Optional
22

33
import logging
44
import os
@@ -146,7 +146,7 @@ def save_checkpoint(
146146
if os.path.isfile(fname):
147147
os.remove(fname)
148148

149-
def find_latest_checkpoint(self) -> Tuple[str, str]:
149+
def find_latest_checkpoint(self) -> Optional[Tuple[str, str]]:
150150
"""
151151
Return the location of the latest model and training state files.
152152
If there isn't a valid checkpoint then return None.

0 commit comments

Comments
 (0)