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): try to fix oom ci errors for openai agents #13079

Closed
wants to merge 6 commits into from

Conversation

lievan
Copy link
Contributor

@lievan lievan commented Apr 4, 2025

Make sure we clean up all the references we have to raw openai sdk 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

Copy link
Contributor

github-actions bot commented Apr 4, 2025

CODEOWNERS have been resolved as:

tests/contrib/openai_agents/requirements.txt                            @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/internal/openai_agents/patch.py                         @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/internal/openai_agents/processor.py                     @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/llmobs/_integrations/openai_agents.py                           @DataDog/ml-observability
tests/contrib/openai_agents/test_openai_agents_patch.py                 @DataDog/apm-core-python @DataDog/apm-idm-python
tests/contrib/patch.py                                                  @DataDog/apm-core-python @DataDog/apm-idm-python

Copy link
Contributor

github-actions bot commented Apr 4, 2025

Bootstrap import analysis

Comparison of import times between this PR and base.

Summary

The average import time from this PR is: 234 ± 3 ms.

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

The import time difference between this PR and base is: 0.7 ± 0.1 ms.

Import time breakdown

The following import paths have grown:

ddtrace.auto 0.377 ms (0.16%)
ddtrace.bootstrap.sitecustomize 0.377 ms (0.16%)
ddtrace.bootstrap.preload 0.377 ms (0.16%)
ddtrace.internal.products 0.188 ms (0.08%)
ddtrace.internal.remoteconfig.worker 0.097 ms (0.04%)
ddtrace.internal.symbol_db.remoteconfig 0.091 ms (0.04%)
ddtrace.internal.symbol_db.symbols 0.091 ms (0.04%)
ddtrace.settings.symbol_db 0.091 ms (0.04%)
ddtrace.internal.runtime.runtime_metrics 0.108 ms (0.05%)
ddtrace.settings.profiling 0.081 ms (0.03%)
ddtrace.internal.datadog.profiling.stack_v2 0.081 ms (0.03%)
ddtrace.internal.datadog.profiling.stack_v2._stack_v2 0.081 ms (0.03%)

The following import paths have shrunk:

ddtrace.auto 2.088 ms (0.89%)
ddtrace.bootstrap.sitecustomize 1.430 ms (0.61%)
ddtrace.bootstrap.preload 1.430 ms (0.61%)
ddtrace.internal.products 1.274 ms (0.55%)
ddtrace.internal.remoteconfig.client 0.586 ms (0.25%)
ddtrace.internal.symbol_db.remoteconfig 0.128 ms (0.05%)
ddtrace.internal.symbol_db.symbols 0.128 ms (0.05%)
ddtrace.settings.dynamic_instrumentation 0.061 ms (0.03%)
ddtrace.settings.crashtracker 0.094 ms (0.04%)
ddtrace.settings.profiling 0.063 ms (0.03%)
ddtrace 0.658 ms (0.28%)

@lievan lievan changed the title chore(llmobs): try to fix -9 exit code test for openai agents chore(llmobs): try to fix oom ci errors for openai agents Apr 4, 2025
@lievan lievan added the changelog/no-changelog A changelog entry is not required for this PR. label Apr 4, 2025
@pr-commenter
Copy link

pr-commenter bot commented Apr 4, 2025

Benchmarks

Benchmark execution time: 2025-04-04 20:07:22

Comparing candidate commit 89db686 in PR branch evan.li/fix-test-oai with baseline commit 9a5fd14 in branch main.

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

@lievan lievan force-pushed the evan.li/fix-test-oai branch from f67d65e to e2480fb Compare April 4, 2025 19:20
lievan added a commit that referenced this pull request Apr 4, 2025
…13080)

Revert #12846 if i dont find a fix soon for OOM ci
failures for `llmobs::openai_agents 4/4`. Currently trying
#13079


https://gitlab.ddbuild.io/DataDog/apm-reliability/dd-trace-py/-/jobs/882041531

## Checklist
- [x] 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](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
- The change includes or references documentation updates if necessary
- Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))

## Reviewer Checklist
- [x] 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](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
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](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)
@lievan lievan closed this Apr 7, 2025
chojomok pushed a commit that referenced this pull request Apr 7, 2025
…13080)

Revert #12846 if i dont find a fix soon for OOM ci
failures for `llmobs::openai_agents 4/4`. Currently trying
#13079


https://gitlab.ddbuild.io/DataDog/apm-reliability/dd-trace-py/-/jobs/882041531

## Checklist
- [x] 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](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
- The change includes or references documentation updates if necessary
- Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))

## Reviewer Checklist
- [x] 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](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
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](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)
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.

1 participant