diff --git a/spacy/training/callbacks.py b/spacy/training/callbacks.py index c2f3b8b51..21c3d56a1 100644 --- a/spacy/training/callbacks.py +++ b/spacy/training/callbacks.py @@ -1,9 +1,11 @@ -from typing import Callable, Optional +from typing import TYPE_CHECKING, Callable, Optional from ..errors import Errors -from ..language import Language from ..util import load_model, logger, registry +if TYPE_CHECKING: + from ..language import Language + @registry.callbacks("spacy.copy_from_base_model.v1") def create_copy_from_base_model(