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

Integration/jonathan.chavez/llm experiments 2 #12520

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

Conversation

jjxct
Copy link
Contributor

@jjxct jjxct commented Feb 25, 2025

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

@jjxct jjxct requested a review from a team as a code owner February 25, 2025 20:32
Copy link
Contributor

CODEOWNERS have been resolved as:

ddtrace/llmobs/experimentation/__init__.py                              @DataDog/ml-observability
ddtrace/llmobs/experimentation/_experiments.py                          @DataDog/ml-observability
tests/llmobs/cassettes/experiments/test_dataset_pull.yaml               @DataDog/ml-observability
tests/llmobs/cassettes/experiments/test_dataset_pull_dne.yaml           @DataDog/ml-observability
tests/llmobs/test_llmobs_experiments.py                                 @DataDog/ml-observability
ddtrace/llmobs/__init__.py                                              @DataDog/ml-observability
ddtrace/llmobs/_constants.py                                            @DataDog/ml-observability
ddtrace/llmobs/_integrations/base.py                                    @DataDog/ml-observability
ddtrace/llmobs/_llmobs.py                                               @DataDog/ml-observability
ddtrace/llmobs/_utils.py                                                @DataDog/ml-observability
ddtrace/llmobs/_writer.py                                               @DataDog/ml-observability
tests/llmobs/test_utils.py                                              @DataDog/ml-observability

Comment on lines +707 to +708
else:
return projects[0]["id"]
Copy link
Contributor

Choose a reason for hiding this comment

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

Code Quality Violation

else is not necessary since the if clause has a return (...read more)

If the code in the if branch returns a value, do not have the else branch present.

View in Datadog  Leave us feedback  Documentation

if seconds < 60:
return f"{seconds:.1f}s"
minutes = int(seconds / 60)
seconds = seconds % 60
Copy link
Contributor

Choose a reason for hiding this comment

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

🟠 Code Quality Violation

variable name is the same as a function parameter (...read more)

A function parameter should only be read and not be modified. If your intent is to modify the value of the parameter, return the value in the function and handle the new value in the caller of the function.

View in Datadog  Leave us feedback  Documentation


# Clear previous line if needed
if self._last_len > len(status):
print("\r" + " " * self._last_len, end="")
Copy link
Contributor

Choose a reason for hiding this comment

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

🟠 Code Quality Violation

use f-string or .format to format strings (...read more)

Concatenation of multiple strings is not efficient and make the code hard to read and understand.

Instead of concatenating multiple strings, use an f-string or a format string.

Learn More

View in Datadog  Leave us feedback  Documentation

@pr-commenter
Copy link

pr-commenter bot commented Feb 25, 2025

Benchmarks

Benchmark execution time: 2025-02-25 21:13:02

Comparing candidate commit e17d8c8 in PR branch integration/jonathan.chavez/llm-experiments-2 with baseline commit b4f4f62 in branch main.

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

scenario:iast_aspects-ospathdirname_aspect

  • 🟩 execution_time [-394.521ns; -324.963ns] or [-9.738%; -8.021%]

scenario:iast_aspects-ospathjoin_aspect

  • 🟩 execution_time [-476.858ns; -413.329ns] or [-8.608%; -7.461%]

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