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

chore(llmobs): assert using span events instead of mocks #11856

Merged
merged 1 commit into from
Jan 9, 2025

Conversation

Yun-Kim
Copy link
Contributor

@Yun-Kim Yun-Kim commented Jan 3, 2025

Follow up of #11781 to further clean up LLMObs tests, specifically replacing potentially flaky LLMObs span writer mocks and assertions with the test LLMObsSpanWriter dummy class. Also clean up the tests/llmobs/conftest.py file which previously contained a ton of rarely used and sometimes redundant fixtures.

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 review from a team as code owners January 3, 2025 22:38
@Yun-Kim Yun-Kim requested review from juanjux and emmettbutler and removed request for a team January 3, 2025 22:38
@Yun-Kim Yun-Kim added the changelog/no-changelog A changelog entry is not required for this PR. label Jan 3, 2025
Copy link
Contributor

github-actions bot commented Jan 3, 2025

CODEOWNERS have been resolved as:

tests/llmobs/conftest.py                                                @DataDog/ml-observability
tests/llmobs/test_llmobs_decorators.py                                  @DataDog/ml-observability
tests/llmobs/test_llmobs_evaluator_runner.py                            @DataDog/ml-observability
tests/llmobs/test_llmobs_ragas_faithfulness_evaluator.py                @DataDog/ml-observability
tests/llmobs/test_llmobs_service.py                                     @DataDog/ml-observability
tests/llmobs/test_propagation.py                                        @DataDog/ml-observability

@datadog-dd-trace-py-rkomorn
Copy link

datadog-dd-trace-py-rkomorn bot commented Jan 3, 2025

Datadog Report

Branch report: yunkim/refactor-span-events
Commit report: 01aac1c
Test service: dd-trace-py

✅ 0 Failed, 1468 Passed, 0 Skipped, 25m 23.96s Total duration (12m 0s time saved)

@pr-commenter
Copy link

pr-commenter bot commented Jan 3, 2025

Benchmarks

Benchmark execution time: 2025-01-09 18:58:32

Comparing candidate commit 76340ca in PR branch yunkim/refactor-span-events with baseline commit d676233 in branch main.

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

@Yun-Kim Yun-Kim force-pushed the llmobs/span-processor branch 2 times, most recently from d0cc865 to 24b8c92 Compare January 6, 2025 18:50
Copy link
Contributor

@ncybul ncybul left a comment

Choose a reason for hiding this comment

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

Besides the one comment I left, this LGTM. Thanks for the thorough explanation! Also, feel free to ping for a final pass.

@Yun-Kim Yun-Kim force-pushed the llmobs/span-processor branch from f39ac5c to 047e147 Compare January 8, 2025 23:07
Base automatically changed from llmobs/span-processor to main January 9, 2025 17:45
@Yun-Kim Yun-Kim requested a review from a team as a code owner January 9, 2025 17:45
@Yun-Kim Yun-Kim requested a review from rachelyangdog January 9, 2025 17:45
@Yun-Kim Yun-Kim force-pushed the yunkim/refactor-span-events branch from 63fa4e0 to 76340ca Compare January 9, 2025 18:18
@Yun-Kim Yun-Kim enabled auto-merge (squash) January 9, 2025 18:19
@Yun-Kim Yun-Kim merged commit 04ee68f into main Jan 9, 2025
221 checks passed
@Yun-Kim Yun-Kim deleted the yunkim/refactor-span-events branch January 9, 2025 18:59
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