evalkeep 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- evalkeep/__init__.py +12 -0
- evalkeep/__main__.py +6 -0
- evalkeep/adapters/__init__.py +45 -0
- evalkeep/adapters/base.py +92 -0
- evalkeep/adapters/jsonl.py +164 -0
- evalkeep/adapters/langsmith.py +436 -0
- evalkeep/adapters/otlp.py +442 -0
- evalkeep/adapters/semconv.py +208 -0
- evalkeep/analysis.py +174 -0
- evalkeep/analysis_run.py +160 -0
- evalkeep/analyzers/__init__.py +52 -0
- evalkeep/analyzers/anthropic.py +145 -0
- evalkeep/analyzers/stub.py +34 -0
- evalkeep/cache.py +122 -0
- evalkeep/cli.py +1933 -0
- evalkeep/clustering.py +383 -0
- evalkeep/clusters.py +101 -0
- evalkeep/commands/__init__.py +1 -0
- evalkeep/commands/analyze_cmd.py +100 -0
- evalkeep/commands/compare_cmd.py +169 -0
- evalkeep/commands/dataset_cmd.py +182 -0
- evalkeep/commands/detect_cmd.py +154 -0
- evalkeep/commands/discover_cmd.py +274 -0
- evalkeep/commands/ingest_cmd.py +50 -0
- evalkeep/commands/init_cmd.py +151 -0
- evalkeep/commands/pipeline_cmd.py +156 -0
- evalkeep/commands/review_cmd.py +141 -0
- evalkeep/commands/run_cmd.py +131 -0
- evalkeep/commands/target_cmd.py +109 -0
- evalkeep/commands/trace_cmd.py +58 -0
- evalkeep/comparison.py +432 -0
- evalkeep/config.py +209 -0
- evalkeep/detection.py +94 -0
- evalkeep/detectors.py +182 -0
- evalkeep/discovery.py +208 -0
- evalkeep/embeddings/__init__.py +31 -0
- evalkeep/embeddings/base.py +32 -0
- evalkeep/embeddings/hashing.py +98 -0
- evalkeep/errors.py +42 -0
- evalkeep/examples/__init__.py +37 -0
- evalkeep/examples/langsmith/runs.jsonl +18 -0
- evalkeep/examples/opentelemetry/spans.json +898 -0
- evalkeep/examples/refund-agent/agents/baseline.py +66 -0
- evalkeep/examples/refund-agent/agents/candidate.py +66 -0
- evalkeep/examples/refund-agent/traces.jsonl +5 -0
- evalkeep/examples/tau-bench/prepare.py +230 -0
- evalkeep/exporters/__init__.py +45 -0
- evalkeep/exporters/generic.py +31 -0
- evalkeep/exporters/promptfoo.py +219 -0
- evalkeep/failures.py +95 -0
- evalkeep/generation.py +303 -0
- evalkeep/hashing.py +56 -0
- evalkeep/ingest.py +257 -0
- evalkeep/prompts.py +127 -0
- evalkeep/pseudonyms.py +82 -0
- evalkeep/py.typed +0 -0
- evalkeep/redaction.py +333 -0
- evalkeep/regression.py +409 -0
- evalkeep/review.py +309 -0
- evalkeep/runner.py +302 -0
- evalkeep/runs.py +185 -0
- evalkeep/storage/__init__.py +37 -0
- evalkeep/storage/clusters.py +163 -0
- evalkeep/storage/failures.py +254 -0
- evalkeep/storage/migrations.py +370 -0
- evalkeep/storage/regression.py +136 -0
- evalkeep/storage/runs.py +223 -0
- evalkeep/storage/store.py +429 -0
- evalkeep/targets.py +205 -0
- evalkeep/trace.py +238 -0
- evalkeep-0.1.0.dist-info/METADATA +221 -0
- evalkeep-0.1.0.dist-info/RECORD +75 -0
- evalkeep-0.1.0.dist-info/WHEEL +4 -0
- evalkeep-0.1.0.dist-info/entry_points.txt +3 -0
- evalkeep-0.1.0.dist-info/licenses/LICENSE +202 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"""Bundled example data, shipped with the package.
|
|
2
|
+
|
|
3
|
+
These live inside the package rather than beside it so that installing from
|
|
4
|
+
PyPI gets them too. A quick start whose every command points at files only a
|
|
5
|
+
git clone has is not a quick start.
|
|
6
|
+
|
|
7
|
+
``evalkeep demo`` copies them out; :func:`root` locates them in place.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
from __future__ import annotations
|
|
11
|
+
|
|
12
|
+
import shutil
|
|
13
|
+
from pathlib import Path
|
|
14
|
+
|
|
15
|
+
#: Files that are not example data and should not be copied out.
|
|
16
|
+
_SKIP = {"__init__.py", "__pycache__"}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def root() -> Path:
|
|
20
|
+
"""Where the bundled examples live inside the installed package."""
|
|
21
|
+
return Path(__file__).resolve().parent
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def available() -> list[str]:
|
|
25
|
+
return sorted(
|
|
26
|
+
entry.name for entry in root().iterdir() if entry.is_dir() and entry.name not in _SKIP
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def copy_to(destination: Path) -> list[Path]:
|
|
31
|
+
"""Copy every bundled example into ``destination``, returning what was written."""
|
|
32
|
+
written: list[Path] = []
|
|
33
|
+
for name in available():
|
|
34
|
+
target = destination / name
|
|
35
|
+
shutil.copytree(root() / name, target, dirs_exist_ok=True)
|
|
36
|
+
written.extend(sorted(p for p in target.rglob("*") if p.is_file()))
|
|
37
|
+
return written
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{"id": "trace-1042-root", "trace_id": "trace-1042", "parent_run_id": null, "name": "RefundAgent", "run_type": "chain", "status": "error", "start_time": "2026-08-14T09:12:03Z", "end_time": "2026-08-14T09:12:03Z", "inputs": {"input": "Refund my latest order."}, "outputs": {"output": "I've refunded order order-A for $24.00."}, "extra": {"metadata": {"ls_model_name": "demo-model-v3", "ls_project_name": "shopping-agent"}}, "tags": ["refund"], "error": "refunded the oldest order, not the newest", "feedback": [{"key": "user_score", "score": 0, "comment": "Refunded the oldest order instead of the newest."}]}
|
|
2
|
+
{"id": "trace-1042-llm", "trace_id": "trace-1042", "parent_run_id": "trace-1042-root", "name": "ChatOpenAI", "run_type": "llm", "status": "success", "start_time": "2026-08-14T09:12:03Z", "inputs": {"messages": [[{"role": "human", "content": "Refund my latest order."}]]}, "outputs": {"generations": [[{"message": {"kwargs": {"content": "I've refunded order order-A for $24.00.", "tool_calls": [{"name": "list_orders", "args": {"customer_id": "cust-77"}}, {"name": "refund_order", "args": {"order_id": "order-A"}}]}}}]]}}
|
|
3
|
+
{"id": "trace-1042-tool-0", "trace_id": "trace-1042", "parent_run_id": "trace-1042-root", "name": "list_orders", "run_type": "tool", "status": "success", "start_time": "2026-08-14T09:12:03Z", "end_time": "2026-08-14T09:12:03Z", "inputs": {"customer_id": "cust-77"}, "outputs": {"result": [{"order_id": "order-A", "placed_at": "2026-06-01", "total": "24.00"}, {"order_id": "order-B", "placed_at": "2026-07-15", "total": "61.50"}, {"order_id": "order-C", "placed_at": "2026-08-12", "total": "18.99"}]}}
|
|
4
|
+
{"id": "trace-1042-tool-1", "trace_id": "trace-1042", "parent_run_id": "trace-1042-root", "name": "refund_order", "run_type": "tool", "status": "success", "start_time": "2026-08-14T09:12:03Z", "end_time": "2026-08-14T09:12:03Z", "inputs": {"order_id": "order-A"}, "outputs": {"status": "refunded", "order_id": "order-A"}}
|
|
5
|
+
{"id": "trace-1043-root", "trace_id": "trace-1043", "parent_run_id": null, "name": "RefundAgent", "run_type": "chain", "status": "error", "start_time": "2026-08-14T09:13:03Z", "end_time": "2026-08-14T09:13:03Z", "inputs": {"input": "Please refund the order I placed most recently."}, "outputs": {"output": "Done - order-D has been refunded."}, "extra": {"metadata": {"ls_model_name": "demo-model-v3", "ls_project_name": "shopping-agent"}}, "tags": ["refund"], "error": "expected order-C, refunded order-D"}
|
|
6
|
+
{"id": "trace-1043-llm", "trace_id": "trace-1043", "parent_run_id": "trace-1043-root", "name": "ChatOpenAI", "run_type": "llm", "status": "success", "start_time": "2026-08-14T09:13:03Z", "inputs": {"messages": [[{"role": "human", "content": "Please refund the order I placed most recently."}]]}, "outputs": {"generations": [[{"message": {"kwargs": {"content": "Done - order-D has been refunded.", "tool_calls": [{"name": "list_orders", "args": {"customer_id": "cust-91"}}, {"name": "refund_order", "args": {"order_id": "order-D"}}]}}}]]}}
|
|
7
|
+
{"id": "trace-1043-tool-0", "trace_id": "trace-1043", "parent_run_id": "trace-1043-root", "name": "list_orders", "run_type": "tool", "status": "success", "start_time": "2026-08-14T09:13:03Z", "end_time": "2026-08-14T09:13:03Z", "inputs": {"customer_id": "cust-91"}, "outputs": {"result": [{"order_id": "order-A", "placed_at": "2026-06-01", "total": "24.00"}, {"order_id": "order-B", "placed_at": "2026-07-15", "total": "61.50"}, {"order_id": "order-C", "placed_at": "2026-08-12", "total": "18.99"}]}}
|
|
8
|
+
{"id": "trace-1043-tool-1", "trace_id": "trace-1043", "parent_run_id": "trace-1043-root", "name": "refund_order", "run_type": "tool", "status": "success", "start_time": "2026-08-14T09:13:03Z", "end_time": "2026-08-14T09:13:03Z", "inputs": {"order_id": "order-D"}, "outputs": {"status": "refunded"}}
|
|
9
|
+
{"id": "trace-1051-root", "trace_id": "trace-1051", "parent_run_id": null, "name": "RefundAgent", "run_type": "chain", "status": "success", "start_time": "2026-08-14T09:14:03Z", "end_time": "2026-08-14T09:14:03Z", "inputs": {"input": "Cancel and refund order-B."}, "outputs": {"output": "I have refunded every order on your account."}, "extra": {"metadata": {"ls_model_name": "demo-model-v3", "ls_project_name": "shopping-agent"}}, "tags": ["refund"], "feedback": [{"key": "user_score", "score": 0, "comment": "Refunded three orders; I asked for one."}]}
|
|
10
|
+
{"id": "trace-1051-llm", "trace_id": "trace-1051", "parent_run_id": "trace-1051-root", "name": "ChatOpenAI", "run_type": "llm", "status": "success", "start_time": "2026-08-14T09:14:03Z", "inputs": {"messages": [[{"role": "human", "content": "Cancel and refund order-B."}]]}, "outputs": {"generations": [[{"message": {"kwargs": {"content": "I have refunded every order on your account.", "tool_calls": [{"name": "refund_order", "args": {"order_id": "order-A"}}, {"name": "refund_order", "args": {"order_id": "order-B"}}, {"name": "refund_order", "args": {"order_id": "order-C"}}]}}}]]}}
|
|
11
|
+
{"id": "trace-1051-tool-0", "trace_id": "trace-1051", "parent_run_id": "trace-1051-root", "name": "refund_order", "run_type": "tool", "status": "success", "start_time": "2026-08-14T09:14:03Z", "end_time": "2026-08-14T09:14:03Z", "inputs": {"order_id": "order-A"}, "outputs": {"status": "refunded"}}
|
|
12
|
+
{"id": "trace-1051-tool-1", "trace_id": "trace-1051", "parent_run_id": "trace-1051-root", "name": "refund_order", "run_type": "tool", "status": "success", "start_time": "2026-08-14T09:14:03Z", "end_time": "2026-08-14T09:14:03Z", "inputs": {"order_id": "order-B"}, "outputs": {"status": "refunded"}}
|
|
13
|
+
{"id": "trace-1051-tool-2", "trace_id": "trace-1051", "parent_run_id": "trace-1051-root", "name": "refund_order", "run_type": "tool", "status": "success", "start_time": "2026-08-14T09:14:03Z", "end_time": "2026-08-14T09:14:03Z", "inputs": {"order_id": "order-C"}, "outputs": {"status": "refunded"}}
|
|
14
|
+
{"id": "trace-1060-root", "trace_id": "trace-1060", "parent_run_id": null, "name": "RefundAgent", "run_type": "chain", "status": "success", "start_time": "2026-08-14T09:15:03Z", "end_time": "2026-08-14T09:15:03Z", "inputs": {"input": "What is the status of order-C?"}, "outputs": {"output": "order-C shipped on 2026-08-13 and arrives Friday."}, "extra": {"metadata": {"ls_model_name": "demo-model-v3", "ls_project_name": "shopping-agent"}}, "tags": []}
|
|
15
|
+
{"id": "trace-1060-llm", "trace_id": "trace-1060", "parent_run_id": "trace-1060-root", "name": "ChatOpenAI", "run_type": "llm", "status": "success", "start_time": "2026-08-14T09:15:03Z", "inputs": {"messages": [[{"role": "human", "content": "What is the status of order-C?"}]]}, "outputs": {"generations": [[{"message": {"kwargs": {"content": "order-C shipped on 2026-08-13 and arrives Friday.", "tool_calls": [{"name": "get_order", "args": {"order_id": "order-C"}}]}}}]]}}
|
|
16
|
+
{"id": "trace-1060-tool-0", "trace_id": "trace-1060", "parent_run_id": "trace-1060-root", "name": "get_order", "run_type": "tool", "status": "success", "start_time": "2026-08-14T09:15:03Z", "end_time": "2026-08-14T09:15:03Z", "inputs": {"order_id": "order-C"}, "outputs": {"order_id": "order-C", "status": "shipped"}}
|
|
17
|
+
{"id": "trace-1061-root", "trace_id": "trace-1061", "parent_run_id": null, "name": "RefundAgent", "run_type": "chain", "status": "success", "start_time": "2026-08-14T09:16:03Z", "end_time": "2026-08-14T09:16:03Z", "inputs": {"input": "Do you ship to Portugal?"}, "outputs": {"output": "Yes, we ship to Portugal."}, "extra": {"metadata": {"ls_model_name": "demo-model-v3", "ls_project_name": "shopping-agent"}}, "tags": []}
|
|
18
|
+
{"id": "trace-1061-llm", "trace_id": "trace-1061", "parent_run_id": "trace-1061-root", "name": "ChatOpenAI", "run_type": "llm", "status": "success", "start_time": "2026-08-14T09:16:03Z", "inputs": {"messages": [[{"role": "human", "content": "Do you ship to Portugal?"}]]}, "outputs": {"generations": [[{"message": {"kwargs": {"content": "Yes, we ship to Portugal.", "tool_calls": []}}}]]}}
|