Skip to content

feat(llmobs): make model name an optional argument for llm(), embedding() #11051

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

Merged
merged 3 commits into from
Oct 21, 2024

Conversation

Yun-Kim
Copy link
Contributor

@Yun-Kim Yun-Kim commented Oct 16, 2024

This PR changes the model_name argument from LLMObs.llm(), LLMObs.embedding(), @llmobs.decorators.llm, @llmobs.decorators.embedding to being an optional argument with a default value of custom.

Previously, being a required argument resulted in slight onboarding friction due to breaking if users did not pass in a model name. By being optional and defaulting to a placeholder value, the llm/embedding() methods should be easier to use and generate spans.

Checklist

  • PR author has checked that all the criteria below are met
  • The PR description includes an overview of the change
  • The PR description articulates the motivation for the change
  • The change includes tests OR the PR description describes a testing strategy
  • The PR description notes risks associated with the change, if any
  • Newly-added code is easy to change
  • The change follows the library release note guidelines
  • The change includes or references documentation updates if necessary
  • Backport labels are set (if applicable)

Reviewer Checklist

  • Reviewer has checked that all the criteria below are met
  • Title is accurate
  • All changes are related to the pull request's stated goal
  • Avoids breaking API changes
  • Testing strategy adequately addresses listed risks
  • Newly-added code is easy to change
  • Release note makes sense to a user of the library
  • If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment
  • Backport labels are set in a manner that is consistent with the release branch maintenance policy

@Yun-Kim Yun-Kim requested a review from a team as a code owner October 16, 2024 20:42
@Yun-Kim Yun-Kim requested review from juanjux and ZStriker19 October 16, 2024 20:42
@Yun-Kim Yun-Kim force-pushed the yunkim/llmobs-model-name-custom-default branch from 5170dc3 to 1e7399c Compare October 16, 2024 20:42
Copy link
Contributor

CODEOWNERS have been resolved as:

releasenotes/notes/feat-llmobs-model-name-optional-d916c96c7ace9375.yaml  @DataDog/apm-python
ddtrace/llmobs/_llmobs.py                                               @DataDog/ml-observability
ddtrace/llmobs/decorators.py                                            @DataDog/ml-observability
tests/llmobs/test_llmobs_decorators.py                                  @DataDog/ml-observability
tests/llmobs/test_llmobs_service.py                                     @DataDog/ml-observability

@Yun-Kim Yun-Kim marked this pull request as draft October 16, 2024 21:13
@Yun-Kim Yun-Kim marked this pull request as ready for review October 16, 2024 21:14
@pr-commenter
Copy link

pr-commenter bot commented Oct 16, 2024

Benchmarks

Benchmark execution time: 2024-10-21 19:09:03

Comparing candidate commit 330c120 in PR branch yunkim/llmobs-model-name-custom-default with baseline commit d45ebca in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 365 metrics, 53 unstable metrics.

Copy link
Contributor

@lievan lievan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thoughts on defaulting to custom instead of custom_model ? for consistency with model provider

@Yun-Kim Yun-Kim requested a review from lievan October 18, 2024 19:49
@Yun-Kim Yun-Kim enabled auto-merge (squash) October 21, 2024 18:28
@Yun-Kim Yun-Kim merged commit 5235955 into main Oct 21, 2024
519 checks passed
@Yun-Kim Yun-Kim deleted the yunkim/llmobs-model-name-custom-default branch October 21, 2024 19:10
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