Skip to content

chore(llmobs): add support for creating experiment #13955

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
Jul 14, 2025

Conversation

Yun-Kim
Copy link
Contributor

@Yun-Kim Yun-Kim commented Jul 10, 2025

MLOB-3275

Adds support for creating Experiments to Datadog. This isn't a user-facing change, but allows the LLMObs service/writer to send a POST request to LLMObs experiments to create a new experiment object.

Also includes minor type hints, as well as changing the LLMObs service instance to be stored on each Experiment object instead of the LLMObs class. Lastly adds tags as an Experiment attribute.

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 added the changelog/no-changelog A changelog entry is not required for this PR. label Jul 10, 2025
Copy link
Contributor

github-actions bot commented Jul 10, 2025

CODEOWNERS have been resolved as:

tests/llmobs/llmobs_cassettes/datadog/datadog_api_unstable_llm-obs_v1_datasets_delete_post_15d029c8.yaml  @DataDog/ml-observability
tests/llmobs/llmobs_cassettes/datadog/datadog_api_unstable_llm-obs_v1_datasets_post_05168258.yaml  @DataDog/ml-observability
tests/llmobs/llmobs_cassettes/datadog/datadog_api_unstable_llm-obs_v1_experiments_post_a0c42048.yaml  @DataDog/ml-observability
tests/llmobs/llmobs_cassettes/datadog/datadog_api_unstable_llm-obs_v1_experiments_post_fad24359.yaml  @DataDog/ml-observability
ddtrace/llmobs/_experiment.py                                           @DataDog/ml-observability
ddtrace/llmobs/_llmobs.py                                               @DataDog/ml-observability
ddtrace/llmobs/_writer.py                                               @DataDog/ml-observability
tests/llmobs/test_experiments.py                                        @DataDog/ml-observability

@Yun-Kim Yun-Kim force-pushed the yunkim/llmobs-create-experiment branch from 7820f7e to 26b17bd Compare July 10, 2025 20:03
Copy link
Contributor

github-actions bot commented Jul 10, 2025

Bootstrap import analysis

Comparison of import times between this PR and base.

Summary

The average import time from this PR is: 274 ± 2 ms.

The average import time from base is: 276 ± 2 ms.

The import time difference between this PR and base is: -1.86 ± 0.08 ms.

Import time breakdown

The following import paths have shrunk:

ddtrace.auto 1.979 ms (0.72%)
ddtrace.bootstrap.sitecustomize 1.304 ms (0.48%)
ddtrace.bootstrap.preload 1.304 ms (0.48%)
ddtrace.internal.remoteconfig.client 0.654 ms (0.24%)
ddtrace 0.675 ms (0.25%)
ddtrace.internal._unpatched 0.030 ms (0.01%)
json 0.030 ms (0.01%)
json.decoder 0.030 ms (0.01%)
re 0.030 ms (0.01%)
enum 0.030 ms (0.01%)
types 0.030 ms (0.01%)

@pr-commenter
Copy link

pr-commenter bot commented Jul 10, 2025

Benchmarks

Benchmark execution time: 2025-07-14 22:52:57

Comparing candidate commit 6741cf7 in PR branch yunkim/llmobs-create-experiment with baseline commit 904966d in branch main.

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

scenario:iastaspectsospath-ospathbasename_aspect

  • 🟥 execution_time [+717.996ns; +827.492ns] or [+16.730%; +19.282%]

scenario:iastaspectsospath-ospathsplitext_aspect

  • 🟥 execution_time [+585.270ns; +714.603ns] or [+12.684%; +15.487%]

@Yun-Kim Yun-Kim force-pushed the yunkim/llmobs-create-experiment branch from fc02519 to c5fb512 Compare July 11, 2025 19:06
@Yun-Kim Yun-Kim changed the base branch from main to yunkim/dne-projects July 11, 2025 19:07
Base automatically changed from yunkim/dne-projects to main July 11, 2025 20:27
@Yun-Kim Yun-Kim force-pushed the yunkim/llmobs-create-experiment branch 2 times, most recently from 1af7041 to 7a27126 Compare July 11, 2025 21:36
@Yun-Kim Yun-Kim changed the base branch from main to yunkim/dne-dataset-versioning July 11, 2025 21:36
Base automatically changed from yunkim/dne-dataset-versioning to main July 11, 2025 21:51
@Yun-Kim Yun-Kim force-pushed the yunkim/llmobs-create-experiment branch from 7a27126 to 482e8d4 Compare July 11, 2025 21:52
@Yun-Kim Yun-Kim marked this pull request as ready for review July 11, 2025 21:53
@Yun-Kim Yun-Kim requested a review from a team as a code owner July 11, 2025 21:53
@Yun-Kim Yun-Kim requested a review from gary-huang July 11, 2025 22:27
@Yun-Kim Yun-Kim enabled auto-merge (squash) July 14, 2025 22:09
@Yun-Kim Yun-Kim merged commit c8d1431 into main Jul 14, 2025
461 checks passed
@Yun-Kim Yun-Kim deleted the yunkim/llmobs-create-experiment branch July 14, 2025 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog/no-changelog A changelog entry is not required for this PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants