From 8b35824793a6e609e5060098d63b5084e4450cd8 Mon Sep 17 00:00:00 2001 From: Madeesh Kannan Date: Fri, 10 Nov 2023 08:05:07 +0100 Subject: [PATCH] Warn about reloading dependencies after downloading models (#13081) * Update the "Missing factory" error message This accounts for model installations that took place during the current Python session. * Add a note about Jupyter notebooks * Move error to `spacy.cli.download` Add extra message for Jupyter sessions * Add additional note for interactive sessions * Remove note about `spacy-transformers` from error message * `isort` * Improve checks for colab (also helps displacy) * Update warning messages * Improve flow for multiple checks --------- Co-authored-by: Adriane Boyd --- spacy/cli/download.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spacy/cli/download.py b/spacy/cli/download.py index 0635522930b..5e460717cc4 100644 --- a/spacy/cli/download.py +++ b/spacy/cli/download.py @@ -7,10 +7,11 @@ from wasabi import msg from .. import about +from ..errors import OLD_MODEL_SHORTCUTS from ..util import ( - get_installed_models, get_minor_version, - get_package_version, + is_in_interactive, + is_in_jupyter, is_package, is_prerelease_version, run_command,