evalrouter 0.3.5__tar.gz → 0.3.7__tar.gz
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.
- evalrouter-0.3.5/README.md → evalrouter-0.3.7/PKG-INFO +103 -5
- evalrouter-0.3.5/PKG-INFO → evalrouter-0.3.7/README.md +83 -20
- {evalrouter-0.3.5 → evalrouter-0.3.7}/pyproject.toml +4 -1
- {evalrouter-0.3.5 → evalrouter-0.3.7}/src/evalrouter_contracts/__init__.py +1 -1
- {evalrouter-0.3.5 → evalrouter-0.3.7}/src/kimpton_evalrouter/__init__.py +10 -1
- {evalrouter-0.3.5 → evalrouter-0.3.7}/src/kimpton_evalrouter/_account.py +527 -23
- evalrouter-0.3.7/src/kimpton_evalrouter/_artifacts.py +294 -0
- evalrouter-0.3.7/src/kimpton_evalrouter/_comparison.py +905 -0
- evalrouter-0.3.7/src/kimpton_evalrouter/_comparison_html.py +233 -0
- {evalrouter-0.3.5 → evalrouter-0.3.7}/src/kimpton_evalrouter/_guided.py +406 -83
- {evalrouter-0.3.5 → evalrouter-0.3.7}/src/kimpton_evalrouter/_resources.py +496 -0
- {evalrouter-0.3.5 → evalrouter-0.3.7}/src/kimpton_evalrouter/cli.py +530 -99
- evalrouter-0.3.7/src/kimpton_evalrouter/langsmith.py +936 -0
- evalrouter-0.3.7/src/kimpton_evalrouter/render/picker.py +490 -0
- evalrouter-0.3.7/src/kimpton_evalrouter/tracing.py +360 -0
- {evalrouter-0.3.5 → evalrouter-0.3.7}/src/kimpton_evalrouter/types.py +743 -1
- evalrouter-0.3.5/src/kimpton_evalrouter/render/picker.py +0 -230
- {evalrouter-0.3.5 → evalrouter-0.3.7}/LICENSE +0 -0
- {evalrouter-0.3.5 → evalrouter-0.3.7}/src/evalrouter_contracts/bundle.py +0 -0
- {evalrouter-0.3.5 → evalrouter-0.3.7}/src/evalrouter_contracts/components.py +0 -0
- {evalrouter-0.3.5 → evalrouter-0.3.7}/src/evalrouter_contracts/models.py +0 -0
- {evalrouter-0.3.5 → evalrouter-0.3.7}/src/evalrouter_contracts/protocol.py +0 -0
- {evalrouter-0.3.5 → evalrouter-0.3.7}/src/evalrouter_contracts/py.typed +0 -0
- {evalrouter-0.3.5 → evalrouter-0.3.7}/src/evalrouter_contracts/templates.py +0 -0
- {evalrouter-0.3.5 → evalrouter-0.3.7}/src/evalrouter_contracts/validation.py +0 -0
- {evalrouter-0.3.5 → evalrouter-0.3.7}/src/kimpton_evalrouter/__main__.py +0 -0
- {evalrouter-0.3.5 → evalrouter-0.3.7}/src/kimpton_evalrouter/_boundary.py +0 -0
- {evalrouter-0.3.5 → evalrouter-0.3.7}/src/kimpton_evalrouter/_helpers.py +0 -0
- {evalrouter-0.3.5 → evalrouter-0.3.7}/src/kimpton_evalrouter/_listing.py +0 -0
- {evalrouter-0.3.5 → evalrouter-0.3.7}/src/kimpton_evalrouter/_transport.py +0 -0
- {evalrouter-0.3.5 → evalrouter-0.3.7}/src/kimpton_evalrouter/py.typed +0 -0
- {evalrouter-0.3.5 → evalrouter-0.3.7}/src/kimpton_evalrouter/render/__init__.py +0 -0
- {evalrouter-0.3.5 → evalrouter-0.3.7}/src/kimpton_evalrouter/render/_console.py +0 -0
- {evalrouter-0.3.5 → evalrouter-0.3.7}/src/kimpton_evalrouter/render/_theme.py +0 -0
- {evalrouter-0.3.5 → evalrouter-0.3.7}/src/kimpton_evalrouter/render/_widgets.py +0 -0
- {evalrouter-0.3.5 → evalrouter-0.3.7}/src/kimpton_evalrouter/render/live.py +0 -0
- {evalrouter-0.3.5 → evalrouter-0.3.7}/src/kimpton_evalrouter/render/screens.py +0 -0
- {evalrouter-0.3.5 → evalrouter-0.3.7}/src/kimpton_evalrouter/render/tables.py +0 -0
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: evalrouter
|
|
3
|
+
Version: 0.3.7
|
|
4
|
+
Summary: Typed Kimpton evaluation client and command-line interface
|
|
5
|
+
License-Expression: LicenseRef-Kimpton-EvalRouter-SDK
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
Requires-Python: <3.14,>=3.12
|
|
8
|
+
Requires-Dist: httpx==0.28.1
|
|
9
|
+
Requires-Dist: rich==15.0.0
|
|
10
|
+
Provides-Extra: benchmark
|
|
11
|
+
Requires-Dist: pydantic==2.13.5; extra == 'benchmark'
|
|
12
|
+
Provides-Extra: keyring
|
|
13
|
+
Requires-Dist: keyring==25.7.0; extra == 'keyring'
|
|
14
|
+
Provides-Extra: langsmith
|
|
15
|
+
Requires-Dist: langsmith==0.12.6; extra == 'langsmith'
|
|
16
|
+
Provides-Extra: tracing
|
|
17
|
+
Requires-Dist: opentelemetry-api==1.45.0; extra == 'tracing'
|
|
18
|
+
Requires-Dist: opentelemetry-sdk==1.45.0; extra == 'tracing'
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
|
|
1
21
|
# EvalRouter CLI
|
|
2
22
|
|
|
3
23
|
Evaluate models or qualified repository agents from your terminal: discover
|
|
@@ -44,6 +64,26 @@ CI and services can use `EVALROUTER_API_KEY` and `EVALROUTER_WORKSPACE_ID` suppl
|
|
|
44
64
|
privately by a secret manager. Never put credentials in arguments, URLs, request
|
|
45
65
|
files or logs.
|
|
46
66
|
|
|
67
|
+
## Import LangSmith traces
|
|
68
|
+
|
|
69
|
+
The optional `langsmith` extra provides a local connector for completed agent
|
|
70
|
+
runs. Create a LangSmith connection in **Traces → Connect agent**, then supply
|
|
71
|
+
`LANGSMITH_API_KEY` and the connection's EvalRouter environment variables through
|
|
72
|
+
your secret manager. The source key is never sent to EvalRouter.
|
|
73
|
+
|
|
74
|
+
```sh
|
|
75
|
+
pip install 'evalrouter[langsmith]'
|
|
76
|
+
python -m kimpton_evalrouter.langsmith projects
|
|
77
|
+
python -m kimpton_evalrouter.langsmith sync --project 'YOUR_PROJECT_ID' \
|
|
78
|
+
--state './evalrouter-langsmith-state.json' --watch
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
The process must stay running for automatic imports. Its private checkpoint
|
|
82
|
+
resumes progress across restarts. Set `--since` to an ISO timestamp to choose
|
|
83
|
+
the initial import window. Inputs and outputs are bounded and field-name
|
|
84
|
+
redacted; only activity recorded by LangSmith can be imported. This connector
|
|
85
|
+
requires a package build that includes the `langsmith` extra.
|
|
86
|
+
|
|
47
87
|
## Run an evaluation in one command
|
|
48
88
|
|
|
49
89
|
```sh
|
|
@@ -52,7 +92,7 @@ evalrouter run gpqa-diamond --model gpt-4o-mini
|
|
|
52
92
|
|
|
53
93
|
`run` matches the benchmark and model by slug, name or ID, suggesting the
|
|
54
94
|
closest names after a typo. It creates a free quote, shows the coverage,
|
|
55
|
-
conservative estimate, spending cap and concurrency, and asks
|
|
95
|
+
conservative estimate, spending cap and concurrency, and asks whether to start the run (Start run or Cancel).
|
|
56
96
|
Only a yes starts paid work. It then follows progress and prints the scores,
|
|
57
97
|
the change from your previous completed run of the same benchmark and model,
|
|
58
98
|
and the report link. In a terminal, missing choices are asked for; run
|
|
@@ -71,8 +111,10 @@ submitted (`~/.local/state/evalrouter`, or `EVALROUTER_STATE_DIR`; identifiers
|
|
|
71
111
|
only, never credentials). Repeating the same command after a dropped connection
|
|
72
112
|
resumes that run instead of starting another; `--new` starts a separate one.
|
|
73
113
|
Afterwards, `results`, `export --format html,json`, `wait` and `open` default to
|
|
74
|
-
your last run and accept a unique run ID prefix.
|
|
75
|
-
|
|
114
|
+
your last run and accept a unique run ID prefix. `results --diff` also compares
|
|
115
|
+
with the previous run of the same benchmark and model; that takes a few more
|
|
116
|
+
requests, so plain `results` does not. Watching a run survives brief API
|
|
117
|
+
outages such as a 503 during a deployment.
|
|
76
118
|
|
|
77
119
|
## Lists
|
|
78
120
|
|
|
@@ -136,10 +178,48 @@ Inspect terminal status, coverage, errors and billing alongside scores. A sample
|
|
|
136
178
|
is not a full-benchmark score. Exports refuse overwrite by default; use the
|
|
137
179
|
result's integer `--version` for repeatable reports.
|
|
138
180
|
|
|
181
|
+
Every command that saves a file prints its full path. An explicit `--output`
|
|
182
|
+
file is used exactly and never replaced (exports accept `--overwrite`); a
|
|
183
|
+
directory, or no file name, gets a default such as `evalrouter-<run>.json` or
|
|
184
|
+
`evalrouter-bundle-<namespace>-<name>-<version>.zip`, moving to the next free
|
|
185
|
+
`-2`, `-3`... name instead of replacing anything. Add `--open` or `--reveal`
|
|
186
|
+
to open the saved file or show it in your file manager; nothing opens
|
|
187
|
+
otherwise, and a missing viewer never fails the command.
|
|
188
|
+
|
|
189
|
+
### Comparing runs
|
|
190
|
+
|
|
191
|
+
```sh
|
|
192
|
+
evalrouter compare RUN_ID RUN_ID --format html --output my-comparison
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
`compare` takes 1 to 8 finished runs of the same benchmark version, dataset,
|
|
196
|
+
task population, task selection and output format in one workspace. Each run
|
|
197
|
+
must be a managed or connected model run; comparison, agent and environment
|
|
198
|
+
runs are refused, and so is a run whose export does not record one of these
|
|
199
|
+
identities. It downloads each run's JSON export again and saves
|
|
200
|
+
`comparison.json` and `sources/<run>.json` in a new private directory.
|
|
201
|
+
`comparison.json` holds each run's model identity (route, revision, protocol,
|
|
202
|
+
recorded limits, generation and routing settings), coverage, errors, its
|
|
203
|
+
frozen native summary with the headline's own denominator, and its settled
|
|
204
|
+
EvalRouter charge. A run that did not complete, or graded fewer tasks than
|
|
205
|
+
planned, is marked partial in `comparison.json` and in its own row of the
|
|
206
|
+
terminal table.
|
|
207
|
+
|
|
208
|
+
`sources/` keeps each export byte for byte, with its SHA-256 recorded. By
|
|
209
|
+
default every graded sample must carry its scored answer: the final completion
|
|
210
|
+
text for SOB, plus the per-sample metadata the export supplies (for SOB, the
|
|
211
|
+
response's token counts and finish reason). Exports do not contain complete
|
|
212
|
+
transcripts, reasoning, timings or per-attempt usage. Keep these files
|
|
213
|
+
private. Use `--without-raw` to archive runs whose answers have expired or
|
|
214
|
+
are withheld by the export policy. Different transports, limits or generation
|
|
215
|
+
settings are listed as warnings. Nothing is regraded, and no deltas,
|
|
216
|
+
intervals or winner are computed. `--output NAME.json` puts the sources in
|
|
217
|
+
`NAME-sources/`.
|
|
218
|
+
|
|
139
219
|
## Supported commands
|
|
140
220
|
|
|
141
221
|
`catalog` (`--models`, `--slug` or `--environment`), `connections list/create/check/update/disable`,
|
|
142
|
-
`quote`, `run`, `status`, `wait`, `cancel`, `results`, `export` and `open`.
|
|
222
|
+
`quote`, `run`, `status`, `wait`, `cancel`, `results`, `export`, `compare` and `open`.
|
|
143
223
|
Repository qualification uses `agent-builds options/preview/create/list/status/cancel`.
|
|
144
224
|
Authoring your own benchmark package uses `benchmark init/validate/bundle`.
|
|
145
225
|
Run each command with `--help` for exact flags. A connected model's credential
|
|
@@ -178,7 +258,7 @@ stays thin (httpx and rich only). With pip, use `pip install 'evalrouter[benchma
|
|
|
178
258
|
uv tool install --python 3.12 "evalrouter[benchmark]"
|
|
179
259
|
evalrouter benchmark init ./my-benchmark --namespace example --name my-benchmark
|
|
180
260
|
evalrouter benchmark validate ./my-benchmark
|
|
181
|
-
evalrouter benchmark bundle ./my-benchmark
|
|
261
|
+
evalrouter benchmark bundle ./my-benchmark # evalrouter-bundle-example-my-benchmark-<version>.zip
|
|
182
262
|
```
|
|
183
263
|
|
|
184
264
|
Without the extra these three commands stop before reading your package and
|
|
@@ -262,3 +342,21 @@ Replace the coverage placeholder with the entire returned object; do not guess
|
|
|
262
342
|
tasks, counts or seeds. Use the existing `quote`, `run`, `wait`, `results` and
|
|
263
343
|
`export` commands above. Qualification and evaluation have separate caps and
|
|
264
344
|
charges. A qualification pass does not submit an evaluation automatically.
|
|
345
|
+
|
|
346
|
+
## Live agent capture
|
|
347
|
+
|
|
348
|
+
Install `evalrouter[tracing]` and use `from kimpton_evalrouter.tracing import TraceCapture`.
|
|
349
|
+
Create a connection in Traces and configure its restricted ingest key with
|
|
350
|
+
`EVALROUTER_TRACE_KEY` and `EVALROUTER_TRACE_CONNECTION_ID`, alongside the API
|
|
351
|
+
origin and workspace ID. Wrap each run with `capture.agent(...)`, and calls with
|
|
352
|
+
`capture.model(...)` or `capture.tool(...)`. Use `span.input(value)` and
|
|
353
|
+
`span.output(value)` to capture content. Call `capture.flush()` before a
|
|
354
|
+
serverless invocation exits and `capture.close()` on shutdown. The optional
|
|
355
|
+
OpenTelemetry dependency is isolated from the base HTTP client.
|
|
356
|
+
|
|
357
|
+
See [the capture guide](https://evalrouter.ai/developers/docs/live-traces) for complete
|
|
358
|
+
examples, redaction settings, coverage, retention, and delivery limits.
|
|
359
|
+
|
|
360
|
+
Use `client.traces` for connection, trace, evaluator and finding resources, and
|
|
361
|
+
`client.datasets` for curation, review, immutable versions and exports.
|
|
362
|
+
These operations require the corresponding service release and workspace permissions.
|
|
@@ -1,18 +1,3 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: evalrouter
|
|
3
|
-
Version: 0.3.5
|
|
4
|
-
Summary: Typed Kimpton evaluation client and command-line interface
|
|
5
|
-
License-Expression: LicenseRef-Kimpton-EvalRouter-SDK
|
|
6
|
-
License-File: LICENSE
|
|
7
|
-
Requires-Python: <3.14,>=3.12
|
|
8
|
-
Requires-Dist: httpx==0.28.1
|
|
9
|
-
Requires-Dist: rich==15.0.0
|
|
10
|
-
Provides-Extra: benchmark
|
|
11
|
-
Requires-Dist: pydantic==2.13.5; extra == 'benchmark'
|
|
12
|
-
Provides-Extra: keyring
|
|
13
|
-
Requires-Dist: keyring==25.7.0; extra == 'keyring'
|
|
14
|
-
Description-Content-Type: text/markdown
|
|
15
|
-
|
|
16
1
|
# EvalRouter CLI
|
|
17
2
|
|
|
18
3
|
Evaluate models or qualified repository agents from your terminal: discover
|
|
@@ -59,6 +44,26 @@ CI and services can use `EVALROUTER_API_KEY` and `EVALROUTER_WORKSPACE_ID` suppl
|
|
|
59
44
|
privately by a secret manager. Never put credentials in arguments, URLs, request
|
|
60
45
|
files or logs.
|
|
61
46
|
|
|
47
|
+
## Import LangSmith traces
|
|
48
|
+
|
|
49
|
+
The optional `langsmith` extra provides a local connector for completed agent
|
|
50
|
+
runs. Create a LangSmith connection in **Traces → Connect agent**, then supply
|
|
51
|
+
`LANGSMITH_API_KEY` and the connection's EvalRouter environment variables through
|
|
52
|
+
your secret manager. The source key is never sent to EvalRouter.
|
|
53
|
+
|
|
54
|
+
```sh
|
|
55
|
+
pip install 'evalrouter[langsmith]'
|
|
56
|
+
python -m kimpton_evalrouter.langsmith projects
|
|
57
|
+
python -m kimpton_evalrouter.langsmith sync --project 'YOUR_PROJECT_ID' \
|
|
58
|
+
--state './evalrouter-langsmith-state.json' --watch
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
The process must stay running for automatic imports. Its private checkpoint
|
|
62
|
+
resumes progress across restarts. Set `--since` to an ISO timestamp to choose
|
|
63
|
+
the initial import window. Inputs and outputs are bounded and field-name
|
|
64
|
+
redacted; only activity recorded by LangSmith can be imported. This connector
|
|
65
|
+
requires a package build that includes the `langsmith` extra.
|
|
66
|
+
|
|
62
67
|
## Run an evaluation in one command
|
|
63
68
|
|
|
64
69
|
```sh
|
|
@@ -67,7 +72,7 @@ evalrouter run gpqa-diamond --model gpt-4o-mini
|
|
|
67
72
|
|
|
68
73
|
`run` matches the benchmark and model by slug, name or ID, suggesting the
|
|
69
74
|
closest names after a typo. It creates a free quote, shows the coverage,
|
|
70
|
-
conservative estimate, spending cap and concurrency, and asks
|
|
75
|
+
conservative estimate, spending cap and concurrency, and asks whether to start the run (Start run or Cancel).
|
|
71
76
|
Only a yes starts paid work. It then follows progress and prints the scores,
|
|
72
77
|
the change from your previous completed run of the same benchmark and model,
|
|
73
78
|
and the report link. In a terminal, missing choices are asked for; run
|
|
@@ -86,8 +91,10 @@ submitted (`~/.local/state/evalrouter`, or `EVALROUTER_STATE_DIR`; identifiers
|
|
|
86
91
|
only, never credentials). Repeating the same command after a dropped connection
|
|
87
92
|
resumes that run instead of starting another; `--new` starts a separate one.
|
|
88
93
|
Afterwards, `results`, `export --format html,json`, `wait` and `open` default to
|
|
89
|
-
your last run and accept a unique run ID prefix.
|
|
90
|
-
|
|
94
|
+
your last run and accept a unique run ID prefix. `results --diff` also compares
|
|
95
|
+
with the previous run of the same benchmark and model; that takes a few more
|
|
96
|
+
requests, so plain `results` does not. Watching a run survives brief API
|
|
97
|
+
outages such as a 503 during a deployment.
|
|
91
98
|
|
|
92
99
|
## Lists
|
|
93
100
|
|
|
@@ -151,10 +158,48 @@ Inspect terminal status, coverage, errors and billing alongside scores. A sample
|
|
|
151
158
|
is not a full-benchmark score. Exports refuse overwrite by default; use the
|
|
152
159
|
result's integer `--version` for repeatable reports.
|
|
153
160
|
|
|
161
|
+
Every command that saves a file prints its full path. An explicit `--output`
|
|
162
|
+
file is used exactly and never replaced (exports accept `--overwrite`); a
|
|
163
|
+
directory, or no file name, gets a default such as `evalrouter-<run>.json` or
|
|
164
|
+
`evalrouter-bundle-<namespace>-<name>-<version>.zip`, moving to the next free
|
|
165
|
+
`-2`, `-3`... name instead of replacing anything. Add `--open` or `--reveal`
|
|
166
|
+
to open the saved file or show it in your file manager; nothing opens
|
|
167
|
+
otherwise, and a missing viewer never fails the command.
|
|
168
|
+
|
|
169
|
+
### Comparing runs
|
|
170
|
+
|
|
171
|
+
```sh
|
|
172
|
+
evalrouter compare RUN_ID RUN_ID --format html --output my-comparison
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
`compare` takes 1 to 8 finished runs of the same benchmark version, dataset,
|
|
176
|
+
task population, task selection and output format in one workspace. Each run
|
|
177
|
+
must be a managed or connected model run; comparison, agent and environment
|
|
178
|
+
runs are refused, and so is a run whose export does not record one of these
|
|
179
|
+
identities. It downloads each run's JSON export again and saves
|
|
180
|
+
`comparison.json` and `sources/<run>.json` in a new private directory.
|
|
181
|
+
`comparison.json` holds each run's model identity (route, revision, protocol,
|
|
182
|
+
recorded limits, generation and routing settings), coverage, errors, its
|
|
183
|
+
frozen native summary with the headline's own denominator, and its settled
|
|
184
|
+
EvalRouter charge. A run that did not complete, or graded fewer tasks than
|
|
185
|
+
planned, is marked partial in `comparison.json` and in its own row of the
|
|
186
|
+
terminal table.
|
|
187
|
+
|
|
188
|
+
`sources/` keeps each export byte for byte, with its SHA-256 recorded. By
|
|
189
|
+
default every graded sample must carry its scored answer: the final completion
|
|
190
|
+
text for SOB, plus the per-sample metadata the export supplies (for SOB, the
|
|
191
|
+
response's token counts and finish reason). Exports do not contain complete
|
|
192
|
+
transcripts, reasoning, timings or per-attempt usage. Keep these files
|
|
193
|
+
private. Use `--without-raw` to archive runs whose answers have expired or
|
|
194
|
+
are withheld by the export policy. Different transports, limits or generation
|
|
195
|
+
settings are listed as warnings. Nothing is regraded, and no deltas,
|
|
196
|
+
intervals or winner are computed. `--output NAME.json` puts the sources in
|
|
197
|
+
`NAME-sources/`.
|
|
198
|
+
|
|
154
199
|
## Supported commands
|
|
155
200
|
|
|
156
201
|
`catalog` (`--models`, `--slug` or `--environment`), `connections list/create/check/update/disable`,
|
|
157
|
-
`quote`, `run`, `status`, `wait`, `cancel`, `results`, `export` and `open`.
|
|
202
|
+
`quote`, `run`, `status`, `wait`, `cancel`, `results`, `export`, `compare` and `open`.
|
|
158
203
|
Repository qualification uses `agent-builds options/preview/create/list/status/cancel`.
|
|
159
204
|
Authoring your own benchmark package uses `benchmark init/validate/bundle`.
|
|
160
205
|
Run each command with `--help` for exact flags. A connected model's credential
|
|
@@ -193,7 +238,7 @@ stays thin (httpx and rich only). With pip, use `pip install 'evalrouter[benchma
|
|
|
193
238
|
uv tool install --python 3.12 "evalrouter[benchmark]"
|
|
194
239
|
evalrouter benchmark init ./my-benchmark --namespace example --name my-benchmark
|
|
195
240
|
evalrouter benchmark validate ./my-benchmark
|
|
196
|
-
evalrouter benchmark bundle ./my-benchmark
|
|
241
|
+
evalrouter benchmark bundle ./my-benchmark # evalrouter-bundle-example-my-benchmark-<version>.zip
|
|
197
242
|
```
|
|
198
243
|
|
|
199
244
|
Without the extra these three commands stop before reading your package and
|
|
@@ -277,3 +322,21 @@ Replace the coverage placeholder with the entire returned object; do not guess
|
|
|
277
322
|
tasks, counts or seeds. Use the existing `quote`, `run`, `wait`, `results` and
|
|
278
323
|
`export` commands above. Qualification and evaluation have separate caps and
|
|
279
324
|
charges. A qualification pass does not submit an evaluation automatically.
|
|
325
|
+
|
|
326
|
+
## Live agent capture
|
|
327
|
+
|
|
328
|
+
Install `evalrouter[tracing]` and use `from kimpton_evalrouter.tracing import TraceCapture`.
|
|
329
|
+
Create a connection in Traces and configure its restricted ingest key with
|
|
330
|
+
`EVALROUTER_TRACE_KEY` and `EVALROUTER_TRACE_CONNECTION_ID`, alongside the API
|
|
331
|
+
origin and workspace ID. Wrap each run with `capture.agent(...)`, and calls with
|
|
332
|
+
`capture.model(...)` or `capture.tool(...)`. Use `span.input(value)` and
|
|
333
|
+
`span.output(value)` to capture content. Call `capture.flush()` before a
|
|
334
|
+
serverless invocation exits and `capture.close()` on shutdown. The optional
|
|
335
|
+
OpenTelemetry dependency is isolated from the base HTTP client.
|
|
336
|
+
|
|
337
|
+
See [the capture guide](https://evalrouter.ai/developers/docs/live-traces) for complete
|
|
338
|
+
examples, redaction settings, coverage, retention, and delivery limits.
|
|
339
|
+
|
|
340
|
+
Use `client.traces` for connection, trace, evaluator and finding resources, and
|
|
341
|
+
`client.datasets` for curation, review, immutable versions and exports.
|
|
342
|
+
These operations require the corresponding service release and workspace permissions.
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "evalrouter"
|
|
7
|
-
version = "0.3.
|
|
7
|
+
version = "0.3.7"
|
|
8
8
|
description = "Typed Kimpton evaluation client and command-line interface"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "LicenseRef-Kimpton-EvalRouter-SDK"
|
|
@@ -19,6 +19,7 @@ requires-python = ">=3.12,<3.14"
|
|
|
19
19
|
dependencies = ["httpx==0.28.1", "rich==15.0.0"]
|
|
20
20
|
|
|
21
21
|
[project.optional-dependencies]
|
|
22
|
+
tracing = ["opentelemetry-api==1.45.0", "opentelemetry-sdk==1.45.0"]
|
|
22
23
|
# Exactly the internal contracts package's own dependency list
|
|
23
24
|
# (packages/contracts/pyproject.toml); build_packages.py refuses any drift.
|
|
24
25
|
benchmark = ["pydantic==2.13.5"]
|
|
@@ -26,6 +27,8 @@ benchmark = ["pydantic==2.13.5"]
|
|
|
26
27
|
# installed; otherwise it uses a private 0600 file. Kept optional so the base
|
|
27
28
|
# installation and every service/runner lock stay unchanged.
|
|
28
29
|
keyring = ["keyring==25.7.0"]
|
|
30
|
+
# Pull LangSmith projects into a local EvalRouter live trace connection.
|
|
31
|
+
langsmith = ["langsmith==0.12.6"]
|
|
29
32
|
|
|
30
33
|
[project.scripts]
|
|
31
34
|
evalrouter = "kimpton_evalrouter.cli:main"
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
from functools import cached_property as _cached_property
|
|
4
4
|
|
|
5
5
|
from . import types
|
|
6
|
+
from ._resources import Traces as _Traces, Datasets as _Datasets
|
|
6
7
|
from ._resources import AgentBuilds as _AgentBuilds
|
|
7
8
|
from ._resources import Agents as _Agents
|
|
8
9
|
from ._resources import Catalog as _Catalog
|
|
@@ -26,10 +27,18 @@ __all__ = [
|
|
|
26
27
|
"WaitCancelled",
|
|
27
28
|
"types",
|
|
28
29
|
]
|
|
29
|
-
__version__ = "0.3.
|
|
30
|
+
__version__ = "0.3.7"
|
|
30
31
|
|
|
31
32
|
|
|
32
33
|
class Client(_Transport):
|
|
34
|
+
@_cached_property
|
|
35
|
+
def traces(self) -> _Traces:
|
|
36
|
+
return _Traces(self)
|
|
37
|
+
|
|
38
|
+
@_cached_property
|
|
39
|
+
def datasets(self) -> _Datasets:
|
|
40
|
+
return _Datasets(self)
|
|
41
|
+
|
|
33
42
|
@_cached_property
|
|
34
43
|
def agent_builds(self) -> _AgentBuilds:
|
|
35
44
|
return _AgentBuilds(self)
|