Skip to content

Commit

Permalink
Downgrade spurious 'error' logs
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ctcjab authored and jab committed Nov 26, 2024
1 parent e607e34 commit 58c46a1
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packages/jupyter-ai-magics/jupyter_ai_magics/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,7 @@ def get_lm_providers(
)
continue
except Exception as e:
log.error(
f"Unable to load model provider `{provider_ep.name}`. Printing full exception below."
)
log.exception(e)
log.warning(f"Unable to load model provider `{provider_ep.name}`", exc_info=e)
continue

if not is_provider_allowed(provider.id, restrictions):
Expand All @@ -66,7 +63,7 @@ def get_em_providers(
try:
provider = model_provider_ep.load()
except Exception as e:
log.error(
log.warning(
f"Unable to load embeddings model provider class from entry point `{model_provider_ep.name}`: %s.",
e,
)
Expand Down

0 comments on commit 58c46a1

Please sign in to comment.