litellm icon indicating copy to clipboard operation
litellm copied to clipboard

[Feature]: Remove f-string formatting from logging

Open rlippmann opened this issue 1 year ago • 1 comments

The Feature

LiteLLM seems to use a lot of f-string logging. This can have slight performance impacts as well as being error prone.

Motivation, pitch

see here for a more detailed explanation

Twitter / LinkedIn details

No response

rlippmann avatar Mar 21 '24 22:03 rlippmann

Great idea @rlippmann, i can run some load tests on this

Are you using the litellm proxy in prod? Would love to understand your use-case better - https://calendly.com/d/4mp-gd3-k5k/litellm-1-1-onboarding-chat

krrishdholakia avatar Mar 22 '24 01:03 krrishdholakia

No, I'm not using it in production.

What I'm looking to do is to write an open source project that will automate porting between languages. Since I will need to convert many source files, using the router functionality (not necessarily through proxy) would be very useful. I would like to understand more about how that works.

It's also the motivation between my enhancement idea for cost based routing, since my main motivation is to do things like convert an open source project in javascript to python (or even C++/Rust/etc).

rlippmann avatar Mar 23 '24 17:03 rlippmann

PR 1 addressing this: https://github.com/BerriAI/litellm/pull/2683

Will stack 1-2 PRs since it's a significant change to how debugging is done

ishaan-jaff avatar Mar 25 '24 17:03 ishaan-jaff

closing as done

ishaan-jaff avatar Jun 19 '24 03:06 ishaan-jaff