I ran into this issue and I want your help. I've experimented with phoenix and found out that it doesn't send traces when we directly import acompletion and aembedding functions from litellm module; however, when I import litellm and use litellm.aecompletion and litellm.aembedding it works. However, using the latter approach would break our tests. So, I'm not sure what is the right approach. I'm not quite sure what is the diff between direct import acompletion and importing module and calling one of its functions. Is it initialization? Is there monkey patching somewhere in the process?
馃挕聽Hint: Mention RunLLM in the thread for followups.
That makes sense. Is there a way to just import those specific methods and then force LiteLLMInstrumentor to do its magic on them without importing the entire package?
馃挕聽Hint: Mention RunLLM in the thread for followups.
Thanks John. I used instrumentor before importing those methods and looks like it's working. Although I get this warning in my logs which I don't know if it's going to cause any problem down the road: Attempting to instrument while already instrumented.
# Instrument first
LiteLLMInstrumentor().instrument(
completion_methods=["acompletion"],
embedding_methods=["aembedding"]
)
# Then import the instrumented methods
from litellm import acompletion, aembedding馃敀[private user] BTW, do you have any paid support for self hosting implementation by any chance?
The former one (technical support for self-host Phoenix on our infra). I'm trying to set up phoenix in our k8s.
I'm available after 2:30pm ET on Monday. That works for me.
