Skip to content

Commit

Permalink
Downgrade spurious 'error' logs (#1119)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
ctcjab and pre-commit-ci[bot] authored Nov 27, 2024
1 parent e607e34 commit f8dc779
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 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,9 @@ 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.warning(
f"Unable to load model provider `{provider_ep.name}`", exc_info=e
)
log.exception(e)
continue

if not is_provider_allowed(provider.id, restrictions):
Expand All @@ -66,7 +65,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 f8dc779

Please sign in to comment.