Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disabling litellm logs doesn't work #1957

Open
NumberChiffre opened this issue Dec 19, 2024 · 4 comments
Open

Disabling litellm logs doesn't work #1957

NumberChiffre opened this issue Dec 19, 2024 · 4 comments

Comments

@NumberChiffre
Copy link

Hey guys,

Since using 2.6.0rc3 and jumping from 2.5.42, I noticed the litellm logs are not disabled by default. I tried:

dspy.disable_litellm_logging()

Which still shows the logs:

20:27:26 - LiteLLM:INFO: utils.py:2678 - 
LiteLLM completion() model= gpt-4o-mini; provider = openai
2024-12-18 20:27:26 [INFO] LiteLLM: 
LiteLLM completion() model= gpt-4o-mini; provider = openai
20:27:27 - LiteLLM:INFO: utils.py:921 - Wrapper: Completed Call, calling success_handler

How do we fully disable any litellm logs?

@NumberChiffre NumberChiffre changed the title Disabling litellm logs Disabling litellm logs doesn't work Dec 19, 2024
@okhat
Copy link
Collaborator

okhat commented Dec 19, 2024

Thank you @NumberChiffre ! Are you saying this was OK in 2.5.42? Maybe it's because LiteLLM versions changed, since I can't recall that we changed this in DSPy.

@NumberChiffre
Copy link
Author

Thank you @NumberChiffre ! Are you saying this was OK in 2.5.42? Maybe it's because LiteLLM versions changed, since I can't recall that we changed this in DSPy.

Yeah, I stayed between 2.5.39 and 2.5.42 for a few weeks before upgrading yesterday!

@arnavsinghvi11
Copy link
Collaborator

arnavsinghvi11 commented Dec 19, 2024

Hey @NumberChiffre ,

if you do litellm._logging._disable_debugging() before your code, does this resolve the issue? If so, I can update the dspy.disable_litellm_logging() function to do this as well.

Seems like litellm.suppress_debug_info (which is what's currently done by dspy.disable_litellm_logging()) doesn't suppress all logging for some reason

as per some of these issues -
BerriAI/litellm#2256
BerriAI/litellm#5403

@NumberChiffre
Copy link
Author

@arnavsinghvi11 thanks for reply, litellm._logging._disable_debugging() didn't work, but this solution worked:
BerriAI/litellm#2256 (comment)

@okhat Maybe this can be used as a solution on DSPy side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants