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

[Feat] Added Opik integration for logging and evaluation #5680

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

dsblank
Copy link

@dsblank dsblank commented Sep 13, 2024

Title

Added Comet's Opik open-source observability integration for logging and evaluation.

For more information on Opik, see: https://github.com/comet-ml/opik

Hope you find this useful!

Type

🆕 New Feature

Changes

  1. Adds documentation: docs/my-website/docs/observability/opik_integration.md
  2. Lists Opik in sidebar
  3. Adds the integration: litellm/integrations/opik.py
  4. Adds tests: litellm/tests/test_opik.py

UI Changes

Screenshot from 2024-09-13 08-36-01

Testing

All Tests Pass:

# Set api keys in environment
pytest litellm/tests/test_opik.py

Screenshot from 2024-09-13 08-18-16

Tests can run with openai and anthropic keys. Traces and spans are logged to a local or hosted Opik server.

Copy link

vercel bot commented Sep 13, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
litellm ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 13, 2024 2:01pm

@dsblank dsblank changed the title Added Opik logging and evaluation [Feat] Added Opik logging and evaluation Sep 13, 2024
@dsblank dsblank changed the title [Feat] Added Opik logging and evaluation [Feat] Added Opik integration for logging and evaluation Sep 13, 2024
@krrishdholakia
Copy link
Contributor

krrishdholakia commented Sep 13, 2024

Hi @dsblank is Opik otel compatible?

If so, we already have an otel logger - could you just inherit from / use that? (it'll mean fewer dependencies on litellm docker images)

class OpenTelemetryConfig:

See the arize_ai integration for reference -

def set_arize_ai_attributes(span: Span, kwargs, response_obj):

@dsblank
Copy link
Author

dsblank commented Sep 13, 2024

@krrishdholakia, I'm checking to be 100% sure, but I don't think so.

@dsblank
Copy link
Author

dsblank commented Sep 16, 2024

@krrishdholakia , no sorry: opik is not OTEL compatible.

Let me know if there is anything else you need.

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

Successfully merging this pull request may close these issues.

2 participants