evalrouter 0.4.1__tar.gz → 0.4.3__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.4.1 → evalrouter-0.4.3}/PKG-INFO +1 -1
- {evalrouter-0.4.1 → evalrouter-0.4.3}/pyproject.toml +1 -1
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/evalrouter_contracts/__init__.py +1 -1
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/__init__.py +1 -1
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_evaluation_jobs_cli.py +98 -12
- evalrouter-0.4.3/src/kimpton_evalrouter/_result_groups.py +196 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_tui_session.py +37 -1
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_tui_views.py +22 -1
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_update_notice.py +6 -5
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/cli.py +133 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/types.py +1 -1
- evalrouter-0.4.1/src/kimpton_evalrouter/_result_groups.py +0 -42
- {evalrouter-0.4.1 → evalrouter-0.4.3}/LICENSE +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/README.md +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/evalrouter/__init__.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/evalrouter/__main__.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/evalrouter/agents.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/evalrouter/langsmith.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/evalrouter/py.typed +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/evalrouter/tracing.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/evalrouter/types.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/evalrouter_contracts/bundle.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/evalrouter_contracts/components.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/evalrouter_contracts/models.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/evalrouter_contracts/protocol.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/evalrouter_contracts/py.typed +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/evalrouter_contracts/templates.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/evalrouter_contracts/validation.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/__main__.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_account.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_acp_agents.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_acp_controller.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_acp_launch.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_acp_registry/LICENSE +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_acp_registry/registry-2026-10-06.json +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_artifacts.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_boundary.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_chain_prefetch.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_chart_format.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_chart_select.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_chart_specs.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_client_run.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_comparison.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_comparison_checkpoint.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_comparison_html.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_environment_publishing.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_failure_guidance.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_forecasts.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_group_results.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_group_review.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_group_summary_prefetch.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_groups.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_guided.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_helpers.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_history_labels.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_in_code.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_listing.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_progress.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_read_cache.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_reasoning_controls.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_release_cli.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_report_brand.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_report_chart_data.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_report_charts.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_report_document.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_report_document_html.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_report_pareto.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_report_theme.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_repository_checkout.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_resources.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_task_adapters/__init__.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_task_adapters/a1_prompt_answer.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_task_adapters/a2_environment.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_task_adapters/a3_file_task.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_task_adapters/a4_repository.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_task_mcp.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_transport.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_tui.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_tui_port.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_tui_table.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_tune.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_web_routes.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_workload_cli.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/agents.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/langsmith.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/py.typed +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/render/__init__.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/render/_console.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/render/_theme.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/render/_widgets.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/render/live.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/render/picker.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/render/screens.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/render/tables.py +0 -0
- {evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/tracing.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: evalrouter
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.3
|
|
4
4
|
Summary: Interactive evaluation workspace, command-line tools, and Python client for EvalRouter
|
|
5
5
|
Project-URL: Homepage, https://evalrouter.ai
|
|
6
6
|
Project-URL: Documentation, https://evalrouter.ai/developers/docs/cli
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "evalrouter"
|
|
7
|
-
version = "0.4.
|
|
7
|
+
version = "0.4.3"
|
|
8
8
|
description = "Interactive evaluation workspace, command-line tools, and Python client for EvalRouter"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "LicenseRef-Kimpton-EvalRouter-SDK"
|
|
@@ -5,8 +5,8 @@ from __future__ import annotations
|
|
|
5
5
|
import time
|
|
6
6
|
import uuid
|
|
7
7
|
|
|
8
|
-
from . import _guided
|
|
9
|
-
from ._transport import ClientError
|
|
8
|
+
from . import _guided, _tui_port
|
|
9
|
+
from ._transport import ClientError, segment
|
|
10
10
|
|
|
11
11
|
ENDPOINT = "/evaluation-jobs"
|
|
12
12
|
TERMINAL = {"completed", "partial", "failed", "cancelled"}
|
|
@@ -131,23 +131,106 @@ def recover(client, request, entry):
|
|
|
131
131
|
return job
|
|
132
132
|
|
|
133
133
|
|
|
134
|
-
def
|
|
134
|
+
def _money(value):
|
|
135
|
+
from .render._widgets import format_money
|
|
136
|
+
|
|
137
|
+
return format_money(value)
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
def _count(value):
|
|
141
|
+
return f"{value:,}" if type(value) is int and value >= 0 else "?"
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
def _micro(value):
|
|
145
|
+
if type(value) is int and value >= 0:
|
|
146
|
+
return value
|
|
147
|
+
if isinstance(value, str) and value.isascii() and value.isdecimal():
|
|
148
|
+
return int(value)
|
|
149
|
+
return None
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
def lines(job, *, client=None):
|
|
153
|
+
"""Project native result metrics and actual/pending costs without score inference."""
|
|
135
154
|
summary = job.get("summary") or {}
|
|
136
|
-
|
|
155
|
+
name = job.get("name") or job.get("id") or "unknown"
|
|
156
|
+
result = [f"Evaluation job {name}: {job.get('status') or 'unknown'}"]
|
|
157
|
+
if client is not None:
|
|
158
|
+
origin = _guided.web_origin(client)
|
|
159
|
+
job_id = job.get("id")
|
|
160
|
+
if origin and isinstance(job_id, str):
|
|
161
|
+
result.append(f"Web report: {origin}/evaluations/jobs/{segment(job_id)}")
|
|
137
162
|
if summary:
|
|
138
163
|
result.append(
|
|
139
|
-
f" {summary.get('graded'
|
|
164
|
+
f" {_count(summary.get('graded'))}/{_count(summary.get('planned'))} graded; "
|
|
165
|
+
f"{_count(summary.get('errors'))} errors; recorded spend "
|
|
166
|
+
f"{_money(summary.get('spend_microusd'))}"
|
|
167
|
+
)
|
|
168
|
+
pending_by_run = {}
|
|
169
|
+
cells = job.get("results") or []
|
|
170
|
+
for cell in cells:
|
|
171
|
+
if not isinstance(cell, dict):
|
|
172
|
+
continue
|
|
173
|
+
chain = [row for row in cell.get("chain") or [] if isinstance(row, dict)]
|
|
174
|
+
latest = chain[-1] if chain else {}
|
|
175
|
+
result.append(
|
|
176
|
+
f" Candidate {cell.get('candidate_index')}, benchmark "
|
|
177
|
+
f"{cell.get('evaluation_index')}: {cell.get('status') or 'unknown'}"
|
|
140
178
|
)
|
|
141
|
-
|
|
179
|
+
for run in chain:
|
|
180
|
+
run_id = run.get("run_id")
|
|
181
|
+
if isinstance(run_id, str):
|
|
182
|
+
reserve = _micro(run.get("reserved_microusd"))
|
|
183
|
+
if run.get("billing_state") != "settled" and reserve:
|
|
184
|
+
pending_by_run[run_id] = reserve
|
|
185
|
+
run_id = latest.get("run_id") or cell.get("run_id")
|
|
186
|
+
if isinstance(run_id, str) and run_id:
|
|
187
|
+
report_url = _guided.report_url(client, run_id) if client is not None else None
|
|
188
|
+
result.append(f" Native report: {report_url or f'evalrouter open {run_id}'}")
|
|
189
|
+
result.append(f" Native task results: evalrouter results {run_id}")
|
|
190
|
+
if cell.get("complete_chain_head") is False and len(chain) > 1:
|
|
191
|
+
result.append(
|
|
192
|
+
" Continuation chain is not a complete result; inspect each native run."
|
|
193
|
+
)
|
|
194
|
+
if pending_by_run:
|
|
142
195
|
result.append(
|
|
143
|
-
f"
|
|
144
|
-
f"{child.get('status') or 'unknown'} | run {child.get('run_id') or 'not admitted'}"
|
|
196
|
+
f" Pending holds: {_money(str(sum(pending_by_run.values())))}; not included as spend."
|
|
145
197
|
)
|
|
198
|
+
if not cells:
|
|
199
|
+
for child in job.get("children") or []:
|
|
200
|
+
if not isinstance(child, dict):
|
|
201
|
+
continue
|
|
202
|
+
run_id = child.get("run_id")
|
|
203
|
+
result.append(
|
|
204
|
+
f" Candidate {child.get('candidate_index')}, benchmark "
|
|
205
|
+
f"{child.get('evaluation_index')}: {child.get('status') or 'unknown'}"
|
|
206
|
+
+ (f" | run {run_id}" if run_id else " | not admitted")
|
|
207
|
+
)
|
|
146
208
|
for item in job.get("board") or []:
|
|
209
|
+
if not isinstance(item, dict):
|
|
210
|
+
continue
|
|
147
211
|
result.append(
|
|
148
|
-
f" {item.get('benchmark_name') or item.get('
|
|
149
|
-
f"{item.get('graded', '?')}/{item.get('planned', '?')} graded"
|
|
212
|
+
f" {item.get('benchmark_name') or item.get('benchmark_id') or item.get('evaluation_index')}"
|
|
150
213
|
)
|
|
214
|
+
for candidate in item.get("candidates") or []:
|
|
215
|
+
if not isinstance(candidate, dict):
|
|
216
|
+
continue
|
|
217
|
+
coverage = (
|
|
218
|
+
candidate.get("coverage") if isinstance(candidate.get("coverage"), dict) else {}
|
|
219
|
+
)
|
|
220
|
+
result.append(
|
|
221
|
+
f" Candidate {candidate.get('candidate_index')}: {candidate.get('status') or 'unknown'} | "
|
|
222
|
+
f"{_count(coverage.get('graded'))}/{_count(coverage.get('planned'))} graded | "
|
|
223
|
+
f"{_count(coverage.get('errors'))} errors"
|
|
224
|
+
)
|
|
225
|
+
headline = candidate.get("headline")
|
|
226
|
+
if isinstance(headline, dict):
|
|
227
|
+
result.append(f" Native metric {headline.get('key')}: {headline.get('value')}")
|
|
228
|
+
comparison = candidate.get("comparison")
|
|
229
|
+
if isinstance(comparison, dict):
|
|
230
|
+
if comparison.get("comparable") is True and comparison.get("delta") is not None:
|
|
231
|
+
result.append(f" Paired delta {comparison.get('delta')}")
|
|
232
|
+
elif comparison.get("reason"):
|
|
233
|
+
result.append(f" Comparison inconclusive: {comparison.get('reason')}")
|
|
151
234
|
return result
|
|
152
235
|
|
|
153
236
|
|
|
@@ -159,7 +242,10 @@ def follow(client, job, args, *, clock=time):
|
|
|
159
242
|
shown = None
|
|
160
243
|
if not getattr(args, "detach", False):
|
|
161
244
|
try:
|
|
162
|
-
|
|
245
|
+
port = _tui_port.current()
|
|
246
|
+
if port is not None:
|
|
247
|
+
job = port.evaluation_job_watch(client, job)
|
|
248
|
+
while port is None and job.get("status") not in TERMINAL:
|
|
163
249
|
current = lines(job)
|
|
164
250
|
if current != shown:
|
|
165
251
|
for line in current:
|
|
@@ -174,5 +260,5 @@ def follow(client, job, args, *, clock=time):
|
|
|
174
260
|
terminal = job.get("status") in TERMINAL
|
|
175
261
|
if terminal:
|
|
176
262
|
job = client.evaluation_jobs.results(identifier)
|
|
177
|
-
args.guided_render = lines
|
|
263
|
+
args.guided_render = lambda result: lines(result, client=client)
|
|
178
264
|
return job, (0 if not terminal or job.get("status") == "completed" else 1)
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
"""Attach existing evaluation runs to a private, reusable results parent."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import json
|
|
6
|
+
import os
|
|
7
|
+
import sys
|
|
8
|
+
from pathlib import Path
|
|
9
|
+
|
|
10
|
+
from . import _artifacts, _guided, render
|
|
11
|
+
from ._transport import ClientError, segment
|
|
12
|
+
from .render._widgets import _plain
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def _label(value: object) -> str:
|
|
16
|
+
return _plain(value) if isinstance(value, (str, int)) else "unknown"
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def _count(value: object) -> str:
|
|
20
|
+
return f"{value:,}" if type(value) is int and value >= 0 else "unknown"
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def _summary_lines(title: str, summary: object) -> list[str]:
|
|
24
|
+
if not isinstance(summary, dict):
|
|
25
|
+
return [f"{title}: summary unavailable"]
|
|
26
|
+
full_passes = summary.get("full_pass_count")
|
|
27
|
+
planned = summary.get("planned_count")
|
|
28
|
+
success = summary.get("success_rate")
|
|
29
|
+
rate = (
|
|
30
|
+
f"{success * 100:.1f}%"
|
|
31
|
+
if type(success) in {float, int} and 0 <= success <= 1
|
|
32
|
+
else "unavailable"
|
|
33
|
+
)
|
|
34
|
+
lines = [
|
|
35
|
+
f"{title}: {_count(full_passes)} / {_count(planned)} full passes ({rate})",
|
|
36
|
+
f" Graded {_count(summary.get('graded_count'))} / {_count(planned)}; "
|
|
37
|
+
f"errors {_count(summary.get('error_count'))}; "
|
|
38
|
+
f"cancelled {_count(summary.get('cancelled_count'))}; "
|
|
39
|
+
f"skipped {_count(summary.get('skipped_count'))}",
|
|
40
|
+
f" Customer charges: {render.format_money(summary.get('charged_microusd'))}; "
|
|
41
|
+
f"total cost: {render.format_money(summary.get('total_cost_microusd'))}",
|
|
42
|
+
]
|
|
43
|
+
per_pass = summary.get("cost_per_success_microusd")
|
|
44
|
+
if isinstance(per_pass, str):
|
|
45
|
+
cost = render.format_money(per_pass)
|
|
46
|
+
elif type(full_passes) is int and full_passes == 0:
|
|
47
|
+
cost = "unavailable (no full passes)"
|
|
48
|
+
elif type(summary.get("pending_operations")) is int and summary["pending_operations"] > 0:
|
|
49
|
+
cost = f"unavailable ({summary['pending_operations']} pending operations)"
|
|
50
|
+
elif summary.get("costs_complete") is not True:
|
|
51
|
+
cost = "unavailable (billing incomplete or external cost unknown)"
|
|
52
|
+
else:
|
|
53
|
+
cost = "unavailable (full-pass score not interpretable)"
|
|
54
|
+
lines.append(f" Cost per full pass: {cost}")
|
|
55
|
+
return lines
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def detail_lines(group: dict, client=None) -> list[str]:
|
|
59
|
+
"""Readable parent summary followed by independent native child results."""
|
|
60
|
+
lines = [f"Result group: {_label(group.get('name'))}", f"ID: {_label(group.get('id'))}"]
|
|
61
|
+
group_id = group.get("id")
|
|
62
|
+
origin = _guided.web_origin(client) if client is not None else None
|
|
63
|
+
if origin and isinstance(group_id, str):
|
|
64
|
+
lines.append(f"Web report: {origin}/evaluations/result-groups/{segment(group_id)}")
|
|
65
|
+
lines.extend(_summary_lines("Overall", group.get("summary")))
|
|
66
|
+
if group.get("costs_as_of"):
|
|
67
|
+
lines.append(f"Current billing read: {_label(group['costs_as_of'])}")
|
|
68
|
+
compatibility = group.get("compatibility")
|
|
69
|
+
if isinstance(compatibility, dict):
|
|
70
|
+
lines.append(
|
|
71
|
+
"Comparability: "
|
|
72
|
+
+ (
|
|
73
|
+
"supported by frozen evidence"
|
|
74
|
+
if compatibility.get("comparable") is True
|
|
75
|
+
else "not established across this group"
|
|
76
|
+
)
|
|
77
|
+
)
|
|
78
|
+
models = [model for model in group.get("models") or [] if isinstance(model, dict)]
|
|
79
|
+
if models:
|
|
80
|
+
model_rows = []
|
|
81
|
+
for model in models:
|
|
82
|
+
summary = model.get("summary") if isinstance(model.get("summary"), dict) else {}
|
|
83
|
+
passes, planned, success = (
|
|
84
|
+
summary.get("full_pass_count"),
|
|
85
|
+
summary.get("planned_count"),
|
|
86
|
+
summary.get("success_rate"),
|
|
87
|
+
)
|
|
88
|
+
rate = (
|
|
89
|
+
f"{success * 100:.1f}%"
|
|
90
|
+
if type(success) in {float, int} and 0 <= success <= 1
|
|
91
|
+
else "unknown"
|
|
92
|
+
)
|
|
93
|
+
pending = summary.get("pending_operations")
|
|
94
|
+
per_pass = summary.get("cost_per_success_microusd")
|
|
95
|
+
cost_per_pass = (
|
|
96
|
+
render.format_money(per_pass)
|
|
97
|
+
if isinstance(per_pass, str)
|
|
98
|
+
else "none"
|
|
99
|
+
if type(passes) is int and passes == 0
|
|
100
|
+
else "pending"
|
|
101
|
+
if type(pending) is int and pending > 0
|
|
102
|
+
else "unknown"
|
|
103
|
+
)
|
|
104
|
+
billing = (
|
|
105
|
+
f"pending {_count(pending)}"
|
|
106
|
+
if type(pending) is int and pending > 0
|
|
107
|
+
else "complete"
|
|
108
|
+
if summary.get("costs_complete") is True
|
|
109
|
+
and summary.get("total_cost_microusd") is not None
|
|
110
|
+
else "unknown"
|
|
111
|
+
)
|
|
112
|
+
model_rows.append(
|
|
113
|
+
[
|
|
114
|
+
_label(model.get("model_label")),
|
|
115
|
+
f"{_count(passes)} / {_count(planned)}",
|
|
116
|
+
rate,
|
|
117
|
+
_count(summary.get("error_count")),
|
|
118
|
+
render.format_money(summary.get("charged_microusd")),
|
|
119
|
+
cost_per_pass,
|
|
120
|
+
billing,
|
|
121
|
+
]
|
|
122
|
+
)
|
|
123
|
+
lines.extend(
|
|
124
|
+
[
|
|
125
|
+
"",
|
|
126
|
+
"Model summary",
|
|
127
|
+
*render.screens.to_lines(
|
|
128
|
+
[
|
|
129
|
+
render.screens._grid(
|
|
130
|
+
[
|
|
131
|
+
("Model", "left", 0),
|
|
132
|
+
("Full passes / tasks", "right", 0),
|
|
133
|
+
("Success", "right", 0),
|
|
134
|
+
("Errors", "right", 1),
|
|
135
|
+
("Charges", "right", 0),
|
|
136
|
+
("Cost / pass", "right", 0),
|
|
137
|
+
("Billing", "left", 2),
|
|
138
|
+
],
|
|
139
|
+
model_rows,
|
|
140
|
+
)
|
|
141
|
+
],
|
|
142
|
+
sys.stdout,
|
|
143
|
+
),
|
|
144
|
+
]
|
|
145
|
+
)
|
|
146
|
+
for model in models:
|
|
147
|
+
lines.extend(["", f"Model: {_label(model.get('model_label'))}"])
|
|
148
|
+
for child in model.get("children") or []:
|
|
149
|
+
if not isinstance(child, dict):
|
|
150
|
+
continue
|
|
151
|
+
lines.append(
|
|
152
|
+
f" Environment: {_label(child.get('environment_label'))} | "
|
|
153
|
+
f"{_label(child.get('status'))} | billing {_label(child.get('billing_state'))}"
|
|
154
|
+
)
|
|
155
|
+
child_summary = child.get("summary")
|
|
156
|
+
if isinstance(child_summary, dict):
|
|
157
|
+
lines.extend(_summary_lines(" Environment summary", child_summary))
|
|
158
|
+
run_id = child.get("run_id")
|
|
159
|
+
if isinstance(run_id, str) and run_id:
|
|
160
|
+
report_url = _guided.report_url(client, run_id) if client is not None else None
|
|
161
|
+
lines.append(f" Native report: {report_url or f'evalrouter open {run_id}'}")
|
|
162
|
+
lines.append(f" Native task results: evalrouter results {run_id}")
|
|
163
|
+
lines.extend(["", "Each child keeps its own tasks, grader, result version and receipts."])
|
|
164
|
+
return lines
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
def command(client, args):
|
|
168
|
+
"""Create or read result groups. No operation here starts or changes a run."""
|
|
169
|
+
if args.action == "create":
|
|
170
|
+
if len(args.run_ids) < 2:
|
|
171
|
+
raise ClientError("invalid_input", "Choose at least two existing run IDs.")
|
|
172
|
+
if len(args.run_ids) > 64:
|
|
173
|
+
raise ClientError("invalid_input", "A result group accepts at most 64 existing run IDs.")
|
|
174
|
+
value = client.result_groups.create({"name": args.name, "run_ids": args.run_ids})
|
|
175
|
+
elif args.action == "list":
|
|
176
|
+
value = client.result_groups.list(params={"limit": args.limit, "cursor": args.cursor})
|
|
177
|
+
elif args.action == "get":
|
|
178
|
+
value = client.result_groups.get(args.group_id)
|
|
179
|
+
else:
|
|
180
|
+
value = client.result_groups.export(args.group_id)
|
|
181
|
+
path = Path(args.output)
|
|
182
|
+
if path.exists() or path.is_symlink():
|
|
183
|
+
raise ClientError("destination_exists", f"Destination already exists: {path}")
|
|
184
|
+
if not path.parent.is_dir():
|
|
185
|
+
raise ClientError("invalid_output", f"Output directory does not exist: {path.parent}")
|
|
186
|
+
data = value if isinstance(value, bytes) else json.dumps(
|
|
187
|
+
value, ensure_ascii=False, indent=2
|
|
188
|
+
).encode("utf-8") + b"\n"
|
|
189
|
+
try:
|
|
190
|
+
with os.fdopen(os.open(path, os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o600), "wb") as stream:
|
|
191
|
+
stream.write(data)
|
|
192
|
+
except FileExistsError:
|
|
193
|
+
raise ClientError("destination_exists", f"Destination already exists: {path}") from None
|
|
194
|
+
_artifacts.saved(args, "result group export", path)
|
|
195
|
+
return {"path": str(path.resolve())}, 0
|
|
196
|
+
return value, 0
|
|
@@ -495,6 +495,27 @@ class Session:
|
|
|
495
495
|
self.watching = False
|
|
496
496
|
return self.latest_run or record, True
|
|
497
497
|
|
|
498
|
+
def evaluation_job_watch(self, client, job, *, poll=5):
|
|
499
|
+
from . import _evaluation_jobs_cli
|
|
500
|
+
|
|
501
|
+
self.watching = True
|
|
502
|
+
self.watch_url = None
|
|
503
|
+
try:
|
|
504
|
+
while True:
|
|
505
|
+
self.check()
|
|
506
|
+
self.ui(
|
|
507
|
+
self.app.show_watch,
|
|
508
|
+
"Evaluation job status",
|
|
509
|
+
"\n".join(_evaluation_jobs_cli.lines(job, client=client)),
|
|
510
|
+
)
|
|
511
|
+
if job.get("status") in _evaluation_jobs_cli.TERMINAL:
|
|
512
|
+
return job
|
|
513
|
+
if self.cancelled.wait(poll):
|
|
514
|
+
self.check()
|
|
515
|
+
job = client.evaluation_jobs.get(job["id"], options=RequestOptions(timeout=30))
|
|
516
|
+
finally:
|
|
517
|
+
self.watching = False
|
|
518
|
+
|
|
498
519
|
def group_watch(self, client, group_id, labels, *, poll=5, initial=None, **_options):
|
|
499
520
|
from . import _groups, _guided
|
|
500
521
|
from ._tui_table import GroupStatus
|
|
@@ -590,7 +611,7 @@ class Session:
|
|
|
590
611
|
|
|
591
612
|
def run_benchmark(self, client, args, ui):
|
|
592
613
|
"""One model selection flow, preserving each existing single/group admission."""
|
|
593
|
-
from . import _groups, _guided, _reasoning_controls
|
|
614
|
+
from . import ClientError, _groups, _guided, _reasoning_controls
|
|
594
615
|
|
|
595
616
|
record, picked, coverage = getattr(args, "_tui_run_setup", (None, [], None))
|
|
596
617
|
step = 0
|
|
@@ -657,6 +678,21 @@ class Session:
|
|
|
657
678
|
if step == 0 or (step == 1 and args.benchmark):
|
|
658
679
|
raise
|
|
659
680
|
step -= 1
|
|
681
|
+
except ClientError as error:
|
|
682
|
+
if error.code == "authentication_required" or getattr(error, "status", None) == 401:
|
|
683
|
+
raise # The command's existing sign-in flow owns auth recovery.
|
|
684
|
+
# Keep the setup alive on a held failure. Back edits the last
|
|
685
|
+
# selection; it must neither discard the draft nor replay an
|
|
686
|
+
# admission whose response may have been lost. The existing
|
|
687
|
+
# journal still owns recovery after an explicit resubmission.
|
|
688
|
+
self.clear_output()
|
|
689
|
+
self.pending_context = None
|
|
690
|
+
self.app.cli.report_error(error)
|
|
691
|
+
step = min(step, 2)
|
|
692
|
+
label = ("benchmarks", "models", "sample size")[step]
|
|
693
|
+
answer = self.select("Could not complete", [f"Back to {label}", "Home"])
|
|
694
|
+
if answer == 1:
|
|
695
|
+
raise _guided.Back from None
|
|
660
696
|
finally:
|
|
661
697
|
args._tui_run_setup = record, picked, coverage
|
|
662
698
|
args.__dict__.pop("tui_prepared", None)
|
|
@@ -316,6 +316,27 @@ class PromptInput(Input):
|
|
|
316
316
|
super().action_cut()
|
|
317
317
|
|
|
318
318
|
|
|
319
|
+
class FilterInput(PromptInput):
|
|
320
|
+
"""Move into the filtered results with the same keys used to browse them."""
|
|
321
|
+
|
|
322
|
+
BINDINGS = [
|
|
323
|
+
Binding("down", "results_down", show=False),
|
|
324
|
+
Binding("up", "results_up", show=False),
|
|
325
|
+
]
|
|
326
|
+
|
|
327
|
+
def action_results_down(self) -> None:
|
|
328
|
+
choices = self.screen.query_one(OptionList)
|
|
329
|
+
if self.screen.matches:
|
|
330
|
+
choices.focus()
|
|
331
|
+
choices.action_cursor_down()
|
|
332
|
+
|
|
333
|
+
def action_results_up(self) -> None:
|
|
334
|
+
choices = self.screen.query_one(OptionList)
|
|
335
|
+
if self.screen.matches:
|
|
336
|
+
choices.focus()
|
|
337
|
+
choices.action_cursor_up()
|
|
338
|
+
|
|
339
|
+
|
|
319
340
|
class Question(Page):
|
|
320
341
|
"""One prompt, with a separately scrollable review and persistent actions."""
|
|
321
342
|
|
|
@@ -351,7 +372,7 @@ class Question(Page):
|
|
|
351
372
|
)
|
|
352
373
|
else:
|
|
353
374
|
if q.filterable:
|
|
354
|
-
yield
|
|
375
|
+
yield FilterInput(
|
|
355
376
|
value=q.query, placeholder="Type to filter…", id="filter", select_on_focus=False
|
|
356
377
|
)
|
|
357
378
|
yield Static("", id="table-heading")
|
|
@@ -45,7 +45,8 @@ Nothing runs for ``--json``/``--jq``/``--no-input``, pipes (stdin, stdout and
|
|
|
45
45
|
stderr must all be terminals), a truthy ``CI``, ``TERM=dumb``, catalog
|
|
46
46
|
``--offline``, local benchmark authoring, ``options``, help or ``--version``,
|
|
47
47
|
or ``EVALROUTER_NO_UPDATE_CHECK=1``. A source checkout, an editable install, a
|
|
48
|
-
|
|
48
|
+
local/dev build and an installer-pinned version get nothing. Registry
|
|
49
|
+
prereleases receive a notice when a newer stable release is available.
|
|
49
50
|
|
|
50
51
|
The only request is an anonymous HTTPS GET of ``https://pypi.org/pypi/evalrouter/json``
|
|
51
52
|
with no credentials, cookies or workspace data, no redirects, a 5 MiB bound and
|
|
@@ -122,8 +123,8 @@ def parse(version) -> tuple[int, ...] | None:
|
|
|
122
123
|
|
|
123
124
|
|
|
124
125
|
def newer(latest, current) -> bool:
|
|
125
|
-
ours, theirs =
|
|
126
|
-
return
|
|
126
|
+
ours, theirs = release_key(current), release_key(latest)
|
|
127
|
+
return parse(latest) is not None and ours is not None and theirs > ours
|
|
127
128
|
|
|
128
129
|
|
|
129
130
|
def eligible(args, environ=None, streams=None) -> bool:
|
|
@@ -897,7 +898,7 @@ def notify(
|
|
|
897
898
|
_started = True
|
|
898
899
|
distribution = distribution or installed()
|
|
899
900
|
current = getattr(distribution, "version", None)
|
|
900
|
-
if distribution is None or
|
|
901
|
+
if distribution is None or release_key(current) is None:
|
|
901
902
|
return None
|
|
902
903
|
command = upgrade(distribution)
|
|
903
904
|
if not command:
|
|
@@ -970,7 +971,7 @@ def watch(
|
|
|
970
971
|
_started = True
|
|
971
972
|
distribution = distribution or installed()
|
|
972
973
|
current = getattr(distribution, "version", None)
|
|
973
|
-
if distribution is None or
|
|
974
|
+
if distribution is None or release_key(current) is None:
|
|
974
975
|
return None
|
|
975
976
|
command = upgrade(distribution)
|
|
976
977
|
if not command:
|
|
@@ -3459,6 +3459,10 @@ def human_result(command, value, **options):
|
|
|
3459
3459
|
colour = not render.is_plain(sys.stdout)
|
|
3460
3460
|
if command == "evaluation-jobs":
|
|
3461
3461
|
action = options.get("action")
|
|
3462
|
+
if action == "results":
|
|
3463
|
+
from . import _evaluation_jobs_cli
|
|
3464
|
+
|
|
3465
|
+
return _evaluation_jobs_cli.lines(value, client=options.get("client"))
|
|
3462
3466
|
if action == "preflight" or isinstance(value.get("preflight"), dict):
|
|
3463
3467
|
preview = value.get("preflight") if isinstance(value.get("preflight"), dict) else value
|
|
3464
3468
|
lines.append(
|
|
@@ -3496,6 +3500,29 @@ def human_result(command, value, **options):
|
|
|
3496
3500
|
f" {scalar(item.get('benchmark_name') or item.get('profile_id') or item.get('evaluation_index'))}: "
|
|
3497
3501
|
f"{scalar(item.get('graded'))}/{scalar(item.get('planned'))} graded"
|
|
3498
3502
|
)
|
|
3503
|
+
elif command == "result-group":
|
|
3504
|
+
if options.get("action") == "get":
|
|
3505
|
+
return _result_groups.detail_lines(value, options.get("client"))
|
|
3506
|
+
if options.get("action") == "export":
|
|
3507
|
+
return []
|
|
3508
|
+
if options.get("action") == "create":
|
|
3509
|
+
group_id = scalar(value.get("id"))
|
|
3510
|
+
return [
|
|
3511
|
+
f"Saved result group {group_id}",
|
|
3512
|
+
f"Read it with: evalrouter result-group get {group_id}",
|
|
3513
|
+
]
|
|
3514
|
+
rows = value.get("data") if isinstance(value.get("data"), list) else [value]
|
|
3515
|
+
lines.append("Saved result groups")
|
|
3516
|
+
for row in rows:
|
|
3517
|
+
if isinstance(row, dict):
|
|
3518
|
+
lines.append(
|
|
3519
|
+
f" {scalar(row.get('name') or row.get('id'))} | "
|
|
3520
|
+
f"{scalar(row.get('model_count'))} models | "
|
|
3521
|
+
f"{scalar(row.get('environment_count'))} environments | "
|
|
3522
|
+
f"{scalar(row.get('member_count'))} runs | ID {scalar(row.get('id'))}"
|
|
3523
|
+
)
|
|
3524
|
+
if not rows:
|
|
3525
|
+
lines.append(" No saved result groups.")
|
|
3499
3526
|
elif command in {"campaigns", "campaign-templates"}:
|
|
3500
3527
|
rows = value.get("data") if isinstance(value.get("data"), list) else [value]
|
|
3501
3528
|
lines.append("Evaluation campaigns" if command == "campaigns" else "Recurring campaign authority")
|
|
@@ -4442,6 +4469,8 @@ def browse_reports(client, args):
|
|
|
4442
4469
|
"Results",
|
|
4443
4470
|
[
|
|
4444
4471
|
("Single run", "single"),
|
|
4472
|
+
("Saved result group", "saved-group"),
|
|
4473
|
+
("One-time evaluation job", "evaluation-job"),
|
|
4445
4474
|
("Group run", "group"),
|
|
4446
4475
|
("Compare runs", "compare"),
|
|
4447
4476
|
],
|
|
@@ -4455,6 +4484,10 @@ def browse_reports(client, args):
|
|
|
4455
4484
|
args.guided_render = follow.guided_render
|
|
4456
4485
|
args.home_group_status_page = getattr(follow, "home_group_status_page", False)
|
|
4457
4486
|
return value, code
|
|
4487
|
+
if mode == "saved-group":
|
|
4488
|
+
return browse_saved_result_groups(client, args)
|
|
4489
|
+
if mode == "evaluation-job":
|
|
4490
|
+
return browse_evaluation_jobs(client, args)
|
|
4458
4491
|
return select_report_runs(client, args, mode)
|
|
4459
4492
|
except _guided.Back:
|
|
4460
4493
|
if args.run_ids:
|
|
@@ -4462,6 +4495,98 @@ def browse_reports(client, args):
|
|
|
4462
4495
|
_guided.erase_to(start)
|
|
4463
4496
|
|
|
4464
4497
|
|
|
4498
|
+
def browse_saved_result_groups(client, args):
|
|
4499
|
+
"""Select a saved private parent and show its independent native results."""
|
|
4500
|
+
rows, cursor = [], None
|
|
4501
|
+
while True:
|
|
4502
|
+
with _guided.loading("Loading saved result groups..."):
|
|
4503
|
+
page = client.result_groups.list(params={"limit": 50, "cursor": cursor})
|
|
4504
|
+
rows.extend(row for row in page.get("data", []) if isinstance(row, dict))
|
|
4505
|
+
next_cursor = page.get("next_cursor")
|
|
4506
|
+
if not rows:
|
|
4507
|
+
args.guided_render = lambda _: ["No saved result groups in this workspace yet."]
|
|
4508
|
+
return {"data": []}, 0
|
|
4509
|
+
options = [
|
|
4510
|
+
(
|
|
4511
|
+
f"{display_scalar(row.get('name') or 'Result group')} · "
|
|
4512
|
+
f"{display_scalar(row.get('model_count'))} models · "
|
|
4513
|
+
f"{display_scalar(row.get('environment_count'))} environments · "
|
|
4514
|
+
f"{display_scalar(row.get('member_count'))} runs · "
|
|
4515
|
+
f"{display_scalar(row.get('created_at'))}",
|
|
4516
|
+
index,
|
|
4517
|
+
)
|
|
4518
|
+
for index, row in enumerate(rows)
|
|
4519
|
+
]
|
|
4520
|
+
if next_cursor:
|
|
4521
|
+
options.append(("Load older result groups…", "more"))
|
|
4522
|
+
table = (
|
|
4523
|
+
["Name", "Models", "Environments", "Runs", "Created"],
|
|
4524
|
+
[
|
|
4525
|
+
[
|
|
4526
|
+
display_scalar(row.get("name")),
|
|
4527
|
+
display_scalar(row.get("model_count")),
|
|
4528
|
+
display_scalar(row.get("environment_count")),
|
|
4529
|
+
display_scalar(row.get("member_count")),
|
|
4530
|
+
display_scalar(row.get("created_at")),
|
|
4531
|
+
]
|
|
4532
|
+
for row in rows
|
|
4533
|
+
],
|
|
4534
|
+
)
|
|
4535
|
+
selected = _guided.choose("Saved result groups", options, table=table)
|
|
4536
|
+
if selected == "more":
|
|
4537
|
+
cursor = next_cursor
|
|
4538
|
+
continue
|
|
4539
|
+
with _guided.loading("Loading the saved result group..."):
|
|
4540
|
+
group = client.result_groups.get(rows[selected]["id"])
|
|
4541
|
+
args.guided_render = lambda _, group=group: _result_groups.detail_lines(group, client)
|
|
4542
|
+
return group, 0
|
|
4543
|
+
|
|
4544
|
+
|
|
4545
|
+
def browse_evaluation_jobs(client, args):
|
|
4546
|
+
"""Select a one-time job and show its native result board."""
|
|
4547
|
+
rows, cursor = [], None
|
|
4548
|
+
while True:
|
|
4549
|
+
with _guided.loading("Loading one-time evaluation jobs..."):
|
|
4550
|
+
page = client.evaluation_jobs.list(params={"limit": 50, "cursor": cursor})
|
|
4551
|
+
rows.extend(row for row in page.get("data", []) if isinstance(row, dict))
|
|
4552
|
+
next_cursor = page.get("next_cursor")
|
|
4553
|
+
if not rows:
|
|
4554
|
+
args.guided_render = lambda _: ["No one-time evaluation jobs in this workspace yet."]
|
|
4555
|
+
return {"data": []}, 0
|
|
4556
|
+
options = [
|
|
4557
|
+
(
|
|
4558
|
+
f"{display_scalar(row.get('name') or 'Evaluation job')} · "
|
|
4559
|
+
f"{display_scalar(row.get('status'))} · {display_scalar(row.get('created_at'))}",
|
|
4560
|
+
index,
|
|
4561
|
+
)
|
|
4562
|
+
for index, row in enumerate(rows)
|
|
4563
|
+
]
|
|
4564
|
+
if next_cursor:
|
|
4565
|
+
options.append(("Load older evaluation jobs…", "more"))
|
|
4566
|
+
table = (
|
|
4567
|
+
["Name", "Status", "Created", "ID"],
|
|
4568
|
+
[
|
|
4569
|
+
[
|
|
4570
|
+
display_scalar(row.get("name")),
|
|
4571
|
+
display_scalar(row.get("status")),
|
|
4572
|
+
display_scalar(row.get("created_at")),
|
|
4573
|
+
display_scalar(row.get("id")),
|
|
4574
|
+
]
|
|
4575
|
+
for row in rows
|
|
4576
|
+
],
|
|
4577
|
+
)
|
|
4578
|
+
selected = _guided.choose("One-time evaluation jobs", options, table=table)
|
|
4579
|
+
if selected == "more":
|
|
4580
|
+
cursor = next_cursor
|
|
4581
|
+
continue
|
|
4582
|
+
with _guided.loading("Loading the job results..."):
|
|
4583
|
+
job = client.evaluation_jobs.results(rows[selected]["id"])
|
|
4584
|
+
from . import _evaluation_jobs_cli
|
|
4585
|
+
|
|
4586
|
+
args.guided_render = lambda _, job=job: _evaluation_jobs_cli.lines(job, client=client)
|
|
4587
|
+
return job, 0
|
|
4588
|
+
|
|
4589
|
+
|
|
4465
4590
|
def check_report_runs(client, picked: list[str]) -> list[str] | None:
|
|
4466
4591
|
"""Runs to compare, checked in one full-screen list; None where it cannot be shown.
|
|
4467
4592
|
|
|
@@ -4706,6 +4831,13 @@ def sign_in_offer(args, error, credentials):
|
|
|
4706
4831
|
OWN_DISPLAY = {"run", "resume", "wait", "events", "benchmark", "feedback", "group"}
|
|
4707
4832
|
|
|
4708
4833
|
_ACTIVITY = (
|
|
4834
|
+
(r"/evaluation-jobs/preflight", "Checking evaluation pairs"),
|
|
4835
|
+
(r"/evaluation-jobs", "Starting evaluation job"),
|
|
4836
|
+
(r"/evaluation-jobs/([^/]+)/results", "Loading job results for {0:.8}"),
|
|
4837
|
+
(r"/evaluation-jobs/([^/]+)", "Checking evaluation job {0:.8}"),
|
|
4838
|
+
(r"/evaluations", "Starting evaluation"),
|
|
4839
|
+
(r"/evaluations/([^/]+)", "Checking evaluation {0:.8}"),
|
|
4840
|
+
(r"/evaluation-selections/compatibility", "Checking compatible models"),
|
|
4709
4841
|
(r"/catalog/benchmarks", "Loading benchmarks"),
|
|
4710
4842
|
(r"/catalog/benchmarks/([^/?]+)", "Loading {0}"),
|
|
4711
4843
|
(r"/catalog/models", "Loading models"),
|
|
@@ -5384,6 +5516,7 @@ def main(argv=None, *, _home=False):
|
|
|
5384
5516
|
all_metrics=getattr(args, "all_metrics", False),
|
|
5385
5517
|
failures=getattr(args, "failures", None),
|
|
5386
5518
|
base=_account.base_url(args),
|
|
5519
|
+
client=client,
|
|
5387
5520
|
action=getattr(args, "action", None),
|
|
5388
5521
|
)
|
|
5389
5522
|
)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"""Generated by scripts/generate_clients.py; OpenAPI SHA256
|
|
1
|
+
"""Generated by scripts/generate_clients.py; OpenAPI SHA256 09228e03c50d524c755f62b9f6c7bd5d9a8e0c0a4b4913241c3c4a0e7335408c."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"""Attach existing evaluation runs to a private, reusable results parent."""
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
import json
|
|
6
|
-
import os
|
|
7
|
-
from pathlib import Path
|
|
8
|
-
|
|
9
|
-
from . import _artifacts
|
|
10
|
-
from ._transport import ClientError
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
def command(client, args):
|
|
14
|
-
"""Create or read result groups. No operation here starts or changes a run."""
|
|
15
|
-
if args.action == "create":
|
|
16
|
-
if len(args.run_ids) < 2:
|
|
17
|
-
raise ClientError("invalid_input", "Choose at least two existing run IDs.")
|
|
18
|
-
if len(args.run_ids) > 64:
|
|
19
|
-
raise ClientError("invalid_input", "A result group accepts at most 64 existing run IDs.")
|
|
20
|
-
value = client.result_groups.create({"name": args.name, "run_ids": args.run_ids})
|
|
21
|
-
elif args.action == "list":
|
|
22
|
-
value = client.result_groups.list(params={"limit": args.limit, "cursor": args.cursor})
|
|
23
|
-
elif args.action == "get":
|
|
24
|
-
value = client.result_groups.get(args.group_id)
|
|
25
|
-
else:
|
|
26
|
-
value = client.result_groups.export(args.group_id)
|
|
27
|
-
path = Path(args.output)
|
|
28
|
-
if path.exists() or path.is_symlink():
|
|
29
|
-
raise ClientError("destination_exists", f"Destination already exists: {path}")
|
|
30
|
-
if not path.parent.is_dir():
|
|
31
|
-
raise ClientError("invalid_output", f"Output directory does not exist: {path.parent}")
|
|
32
|
-
data = value if isinstance(value, bytes) else json.dumps(
|
|
33
|
-
value, ensure_ascii=False, indent=2
|
|
34
|
-
).encode("utf-8") + b"\n"
|
|
35
|
-
try:
|
|
36
|
-
with os.fdopen(os.open(path, os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o600), "wb") as stream:
|
|
37
|
-
stream.write(data)
|
|
38
|
-
except FileExistsError:
|
|
39
|
-
raise ClientError("destination_exists", f"Destination already exists: {path}") from None
|
|
40
|
-
_artifacts.saved(args, "result group export", path)
|
|
41
|
-
return {"path": str(path.resolve())}, 0
|
|
42
|
-
return value, 0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_acp_registry/registry-2026-10-06.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_task_adapters/a1_prompt_answer.py
RENAMED
|
File without changes
|
{evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_task_adapters/a2_environment.py
RENAMED
|
File without changes
|
|
File without changes
|
{evalrouter-0.4.1 → evalrouter-0.4.3}/src/kimpton_evalrouter/_task_adapters/a4_repository.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|