-
Notifications
You must be signed in to change notification settings - Fork 470
chore(llmobs): add base datasets for experiments #13852
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
Changes from 8 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
3a7c8a4
feat(llmobs): add base datasets and experiments
Kyle-Verhoog d2e70ef
add create/deletion methods, add tests
Kyle-Verhoog 8cf0129
reuse base writer logic
Kyle-Verhoog 3e3359e
add typing
Kyle-Verhoog 114d9ea
add app key setting, docs for testing
Kyle-Verhoog 7edfebc
add test agent config + cassettes
Kyle-Verhoog a72ef3d
fmt
Kyle-Verhoog 6f5395d
typing
Kyle-Verhoog 90fbab6
stronger typing / failing early, add test agent mount
Kyle-Verhoog 765497b
use app key defined on llmobs service
Kyle-Verhoog 5818126
move cassettes to llmobs test dir
Kyle-Verhoog 63976ed
fmt
Kyle-Verhoog 884d89a
Merge remote-tracking branch 'origin/main' into llmobs/dne
Kyle-Verhoog 454bb70
replace asserts with value errors
Kyle-Verhoog 3de7540
add test agent to llmobs suite
Kyle-Verhoog 377c1b8
bump testagent
Kyle-Verhoog 031fb5b
wrong versions, im just a manager
Kyle-Verhoog d1bca21
Merge branch 'main' into llmobs/dne
Kyle-Verhoog 2d8ae9f
add cassette dir to testagent maybe
Kyle-Verhoog 85bbec1
Merge branch 'main' into llmobs/dne
Kyle-Verhoog 06c2352
Merge branch 'main' into llmobs/dne
Kyle-Verhoog File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| from typing import Any | ||
| from typing import Dict | ||
| from typing import List | ||
| from typing import Optional | ||
| from typing import TypedDict | ||
| from typing import Union | ||
|
|
||
| from typing_extensions import NotRequired | ||
|
|
||
|
|
||
| JSONType = Union[str, int, float, bool, None, List["JSONType"], Dict[str, "JSONType"]] | ||
| NonNoneJSONType = Union[str, int, float, bool, List[JSONType], Dict[str, JSONType]] | ||
|
|
||
|
|
||
| class DatasetRecord(TypedDict): | ||
| input: NonNoneJSONType | ||
| expected_output: JSONType | ||
| metadata: Dict[str, Any] | ||
| record_id: NotRequired[Optional[str]] | ||
|
|
||
|
|
||
| class Dataset: | ||
| name: str | ||
| _id: str | ||
| _data: List[DatasetRecord] | ||
|
|
||
| def __init__(self, name: str, dataset_id: str, data: List[DatasetRecord]) -> None: | ||
| self.name = name | ||
| self._id = dataset_id | ||
| self._data = data | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
...stable_llm-obs_v1_datasets_034c285b-bc5b-4681-bc57-06a04289a7a0_records_get_593dc7d4.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| interactions: | ||
| - request: | ||
| body: null | ||
| headers: | ||
| Accept: | ||
| - '*/*' | ||
| ? !!python/object/new:multidict._multidict.istr | ||
| - Accept-Encoding | ||
| : - identity | ||
| Connection: | ||
| - keep-alive | ||
| ? !!python/object/new:multidict._multidict.istr | ||
| - Content-Length | ||
| : - '0' | ||
| ? !!python/object/new:multidict._multidict.istr | ||
| - Content-Type | ||
| : - application/json | ||
| User-Agent: | ||
| - python-requests/2.32.3 | ||
| method: GET | ||
| uri: https://api.datadoghq.com/api/unstable/llm-obs/v1/datasets/034c285b-bc5b-4681-bc57-06a04289a7a0/records | ||
| response: | ||
| body: | ||
| string: '{"data":[],"meta":{"after":""}}' | ||
| headers: | ||
| content-length: | ||
| - '31' | ||
| content-security-policy: | ||
| - frame-ancestors 'self'; report-uri https://logs.browser-intake-datadoghq.com/api/v2/logs?dd-api-key=pube4f163c23bbf91c16b8f57f56af9fc58&dd-evp-origin=content-security-policy&ddsource=csp-report&ddtags=site%3Adatadoghq.com | ||
| content-type: | ||
| - application/vnd.api+json | ||
| date: | ||
| - Mon, 07 Jul 2025 17:43:06 GMT | ||
| strict-transport-security: | ||
| - max-age=31536000; includeSubDomains; preload | ||
| vary: | ||
| - Accept-Encoding | ||
| x-content-type-options: | ||
| - nosniff | ||
| x-frame-options: | ||
| - SAMEORIGIN | ||
| status: | ||
| code: 200 | ||
| message: OK | ||
| version: 1 |
46 changes: 46 additions & 0 deletions
46
tests/cassettes/datadog/datadog_api_unstable_llm-obs_v1_datasets_delete_post_63d2ed68.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| interactions: | ||
| - request: | ||
| body: '{"data": {"type": "datasets", "attributes": {"type": "soft", "dataset_ids": | ||
| ["8a37c116-c381-422d-ba72-cee2055ef304"]}}}' | ||
| headers: | ||
| Accept: | ||
| - '*/*' | ||
| ? !!python/object/new:multidict._multidict.istr | ||
| - Accept-Encoding | ||
| : - identity | ||
| Connection: | ||
| - keep-alive | ||
| Content-Length: | ||
| - '119' | ||
| ? !!python/object/new:multidict._multidict.istr | ||
| - Content-Type | ||
| : - application/json | ||
| User-Agent: | ||
| - python-requests/2.32.3 | ||
| method: POST | ||
| uri: https://api.datadoghq.com/api/unstable/llm-obs/v1/datasets/delete | ||
| response: | ||
| body: | ||
| string: '{"data":[{"id":"8a37c116-c381-422d-ba72-cee2055ef304","type":"datasets","attributes":{"author":{"id":"0dd9d379-c1a3-11ed-b4e0-566658a732f8"},"created_at":"2025-07-07T17:43:01.802098Z","current_version":0,"deleted_at":"2025-07-07T17:43:02.178053Z","description":"A | ||
| second test dataset","name":"test-dataset-2","updated_at":"2025-07-07T17:43:01.802098Z"}}]}' | ||
| headers: | ||
| content-length: | ||
| - '355' | ||
| content-security-policy: | ||
| - frame-ancestors 'self'; report-uri https://logs.browser-intake-datadoghq.com/api/v2/logs?dd-api-key=pube4f163c23bbf91c16b8f57f56af9fc58&dd-evp-origin=content-security-policy&ddsource=csp-report&ddtags=site%3Adatadoghq.com | ||
| content-type: | ||
| - application/vnd.api+json | ||
| date: | ||
| - Mon, 07 Jul 2025 17:43:02 GMT | ||
| strict-transport-security: | ||
| - max-age=31536000; includeSubDomains; preload | ||
| vary: | ||
| - Accept-Encoding | ||
| x-content-type-options: | ||
| - nosniff | ||
| x-frame-options: | ||
| - SAMEORIGIN | ||
| status: | ||
| code: 200 | ||
| message: OK | ||
| version: 1 |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.