Open Yun-Kim opened 3 days ago
Branch report: yunkim/llmobs-openai-embeddings
Commit report: 5b100ea
Test service: dd-trace-py
:x: 24 Failed (3 Known Flaky), 2269 Passed, 38039 Skipped, 53m 12.49s Total duration (35m 43.15s time saved)
This report shows up to 5 failed tests.
test_embedding_array_of_token_arrays[ddtrace_global_config0]
-test_openai_llmobs.py
- Details
<details>
<summary>Expand for error</summary>
```
expected call not found.
Expected: enqueue({'span_id': '2508543017903380100', 'trace_id': '6682c26e00000000a5ef365d54aec50b', 'parent_id': 'undefined', 'session_id': '6682c26e00000000a5ef365d54aec50b', 'name': 'openai.request', 'tags': ['version:', 'env:', 'service:', 'source:integration', 'ml_app:<ml-app-name>', 'session_id:6682c26e00000000a5ef365d54aec50b', 'ddtrace.version:2.11.0.dev66+g5b100ea48', 'error:0'], 'start_ns': 1719845486809183393, 'duration': 64067652, 'status': 'ok', 'meta': {'span.kind': 'embedding', 'input': {'documents': [{'text': '[1111, 2222, 3333]'}, {'text': '[4444, 5555, 6666]'}, {'text': '[7777, 8888, 9999]'}]}, 'output': {'value': '[3 embedding(s) returned with size 1536]'}, 'metadata': {'encoding_format': 'float'}, 'model_name': 'text-embedding-ada-002-v2', 'model_provider': 'openai'}, 'metrics': {'prompt_tokens': 9, 'completion_tokens': 0, 'total_tokens': 9}})
Actual: enqueue({'trace_id': '6682c26e00000000a5ef365d54aec50b', 'span_id': '2508543017903380100', 'parent_id': 'undefined', 'session_id': '6682c26e00000000a5ef365d54aec50b', 'name': 'openai.request', 'tags': ['version:', 'env:', 'service:', 'source:integration', 'ml_app:<ml-app-name>', 'session_id:6682c26e00000000a5ef365d54aec50b', 'ddtrace.version:2.11.0.dev66+g5b100ea48', 'error:0'], 'start_ns': 1719845486809183393, 'duration': 64067652, 'status': 'ok', 'meta': {'span.kind': 'embedding', 'input': {'documents': [{'text': '[1111, 2222, 3333]'}, {'text': '[4444, 5555, 6666]'}, {'text': '[7777, 8888, 9999]'}]}, 'output': {'value': '[3 embedding(s) returned with size 1536]'}, 'model_name': 'text-embedding-ada-002-v2', 'model_provider': 'openai', 'metadata': {'encoding_format': 'float'}}, 'metrics': {'input_tokens': 9, 'output_tokens': 0, 'total_tokens': 9}})
```
</details>
test_embedding_array_of_token_arrays[ddtrace_global_config0]
- test_openai_llmobs.py
- Details
test_embedding_array_of_token_arrays[ddtrace_global_config0]
- test_openai_llmobs.py
- Details
test_embedding_array_of_token_arrays[ddtrace_global_config0]
- test_openai_llmobs.py
test_embedding_array_of_token_arrays[ddtrace_global_config0]
- test_openai_llmobs.py
- Details
Benchmark execution time: 2024-06-28 21:22:33
Comparing candidate commit e3315c7361a479800ad3c3df53f1720604f457c2 in PR branch yunkim/llmobs-openai-embeddings
with baseline commit 9c9b5a7e9d5977438cb98a6d86cf00b23f7fa3ff in branch main
.
Found 0 performance improvements and 0 performance regressions! Performance is the same for 221 metrics, 9 unstable metrics.
This PR adds instrumentation to submit openai embedding spans to LLM Observability. The embedding spans sent to LLM Observability will contain the following I/O data:
encoding_format
anddimensions
(when applicable/provided)[X embeddings returned with size Y]
(if returned inbase64
format, we do not mention the size as it is not trivial to determine from the output)Note: we currently store embedding inputs as
input.documents
(storing as text-only Documents). For single input cases this is fine, but however the backend and UI currently default to concatenating multi-inputs into a singleinput.value
string which does not result in the greatest display (non-JSON object). This issue can be fixed in the frontend.Checklist
changelog/no-changelog
is set@DataDog/apm-tees
.Reviewer Checklist