Skip to content

Commit f8dc779

Browse files
Downgrade spurious 'error' logs (#1119)
* Downgrade spurious 'error' logs Since it is expected that not all model providers will be loadable, it is wrong to log the case that one cannot be loaded with level 'error'. Resolves #839. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent e607e34 commit f8dc779

File tree

1 file changed

+3
-4
lines changed
  • packages/jupyter-ai-magics/jupyter_ai_magics

1 file changed

+3
-4
lines changed

packages/jupyter-ai-magics/jupyter_ai_magics/utils.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,9 @@ def get_lm_providers(
3636
)
3737
continue
3838
except Exception as e:
39-
log.error(
40-
f"Unable to load model provider `{provider_ep.name}`. Printing full exception below."
39+
log.warning(
40+
f"Unable to load model provider `{provider_ep.name}`", exc_info=e
4141
)
42-
log.exception(e)
4342
continue
4443

4544
if not is_provider_allowed(provider.id, restrictions):
@@ -66,7 +65,7 @@ def get_em_providers(
6665
try:
6766
provider = model_provider_ep.load()
6867
except Exception as e:
69-
log.error(
68+
log.warning(
7069
f"Unable to load embeddings model provider class from entry point `{model_provider_ep.name}`: %s.",
7170
e,
7271
)

0 commit comments

Comments
 (0)