Skip to content

Commit beb472f

Browse files
authored
Merge pull request #14 from pankaj4u4m/telemetry
Telemetry
2 parents 4aa3961 + eab9303 commit beb472f

128 files changed

Lines changed: 5234 additions & 5790 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ pre-commit: format lint typecheck test ## Format, lint, typecheck, and test
8787
# --------------------------------------------------------------------------- #
8888

8989
benchmark: ## Run the full benchmark suite
90-
LOCAL=1 atelier benchmark-full --json
90+
LOCAL=1 atelier benchmark full --json
9191

9292
bench-savings: ## Run the context-savings benchmark
9393
LOCAL=1 uv run python -m benchmarks.swe.savings_bench --json

QUICK_REFERENCE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ atelier verify rubric_shopify_publish --checks '{"check_1": true, ...}'
167167
atelier block list --domain beseam.shopify.publish
168168
atelier eval list
169169
atelier eval run <case_id>
170-
atelier benchmark --apply
170+
atelier benchmark run
171171
atelier analyze-failures
172172
atelier savings
173173
atelier tool-mode set shadow

benchmarks/swe/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ events, rescue events, rubric verdicts).
1414
```
1515
benchmarks/swe/
1616
├── README.md ← you are here
17-
├── run_swe_bench.py ← Click entry: `atelier-bench swe `
17+
├── run_swe_bench.py ← Click entry: `atelier benchmark swe ...`
1818
├── config.py ← strict pydantic config schema
1919
├── datasets.py ← swe_bench_lite / verified / mock / custom JSONL
2020
├── task_runner.py ← one (task × mode × attempt) → metrics row
@@ -45,14 +45,14 @@ benchmarks/swe/
4545
`show-modes` prints the matrix at runtime:
4646

4747
```bash
48-
uv run atelier-bench swe show-modes
48+
uv run atelier benchmark swe show-modes
4949
```
5050

5151
## Quickstart (offline, no API keys)
5252

5353
```bash
5454
# 20-task mock run (uses built-in mock dataset + MockAgent)
55-
uv run atelier-bench swe run --config benchmarks/swe/configs/lite_20.yaml
55+
uv run atelier benchmark swe run --config benchmarks/swe/configs/lite_20.yaml
5656

5757
# Output:
5858
# benchmarks/swe/outputs/lite_20/<TIMESTAMP>/
@@ -64,10 +64,10 @@ uv run atelier-bench swe run --config benchmarks/swe/configs/lite_20.yaml
6464
# report.json
6565

6666
# Score predictions (mock evaluator if `swebench` not installed)
67-
uv run atelier-bench swe evaluate --run-dir benchmarks/swe/outputs/lite_20/<TS> --mock
67+
uv run atelier benchmark swe evaluate --run-dir benchmarks/swe/outputs/lite_20/<TS> --mock
6868

6969
# Re-render report from existing metrics
70-
uv run atelier-bench swe report --run-dir benchmarks/swe/outputs/lite_20/<TS>
70+
uv run atelier benchmark swe report --run-dir benchmarks/swe/outputs/lite_20/<TS>
7171
```
7272

7373
## Make targets
@@ -116,7 +116,7 @@ This is the schema accepted by
116116

117117
```bash
118118
uv pip install swebench
119-
uv run atelier-bench swe evaluate --run-dir benchmarks/swe/outputs/lite_20/<TS>
119+
uv run atelier benchmark swe evaluate --run-dir benchmarks/swe/outputs/lite_20/<TS>
120120
```
121121

122122
If `swebench` is missing the command prints exact install instructions and

benchmarks/swe/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
Public entry points:
99
1010
* :func:`benchmarks.swe.run_swe_bench.cli` — Click command group exposed
11-
as the ``atelier-bench`` console script.
11+
as ``atelier benchmark swe`` subcommands.
1212
* :class:`benchmarks.swe.config.BenchConfig`
1313
* :class:`benchmarks.swe.modes.Mode`
1414

benchmarks/swe/run_swe_bench.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""``atelier-bench swe`` — Click command group entry point.
1+
"""``atelier benchmark swe`` — Click command group entry point.
22
33
Subcommands:
44
run run the harness end-to-end against a config
@@ -41,7 +41,7 @@ def swe() -> None:
4141

4242
@click.group(context_settings={"help_option_names": ["-h", "--help"]})
4343
def cli() -> None:
44-
"""atelier-bench benchmarking harnesses for Atelier."""
44+
"""SWE-bench benchmarking harnesses for Atelier."""
4545

4646

4747
cli.add_command(swe)
@@ -219,8 +219,8 @@ def cmd_measure_context_savings(suite_path: str | None, emit_json: bool) -> None
219219
raise click.ClickException(f"context savings {result.reduction_pct:.2f}% is below the 50% CI gate")
220220

221221

222-
def main() -> None: # console-script entry point
223-
cli()
222+
def main() -> None:
223+
raise click.ClickException("atelier-bench has been removed; use `atelier benchmark swe ...`")
224224

225225

226226
if __name__ == "__main__":

benchmarks/swe/savings_replay.py

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -478,9 +478,10 @@ def _persist_result(db_path: Path, result: ReplayResult, completed_at: datetime,
478478
conn.execute(
479479
"""
480480
INSERT INTO benchmark_prompt_result (
481-
id, session_id, prompt_id, task_type, baseline_input_tokens,
482-
optimized_input_tokens, reduction_pct, lever_attribution_json
483-
) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
481+
id, session_id, prompt_id, task_type, input_tokens_baseline,
482+
input_tokens_optimized, reduction_pct, duration_ms, created_at,
483+
baseline_input_tokens, optimized_input_tokens, lever_attribution_json
484+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
484485
""",
485486
(
486487
f"bpr-{make_uuid7()}",
@@ -490,6 +491,10 @@ def _persist_result(db_path: Path, result: ReplayResult, completed_at: datetime,
490491
prompt.baseline_input_tokens,
491492
prompt.optimized_input_tokens,
492493
prompt.reduction_pct,
494+
0,
495+
completed_at.isoformat(),
496+
prompt.baseline_input_tokens,
497+
prompt.optimized_input_tokens,
493498
json.dumps({prompt.lever: prompt.tokens_saved}, sort_keys=True),
494499
),
495500
)
@@ -530,9 +535,10 @@ def _persist_paired_command_result(
530535
conn.execute(
531536
"""
532537
INSERT INTO benchmark_prompt_result (
533-
id, session_id, prompt_id, task_type, baseline_input_tokens,
534-
optimized_input_tokens, reduction_pct, lever_attribution_json
535-
) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
538+
id, session_id, prompt_id, task_type, input_tokens_baseline,
539+
input_tokens_optimized, reduction_pct, duration_ms, created_at,
540+
baseline_input_tokens, optimized_input_tokens, lever_attribution_json
541+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
536542
""",
537543
(
538544
f"bpr-{make_uuid7()}",
@@ -542,6 +548,10 @@ def _persist_paired_command_result(
542548
prompt.baseline.total_tokens,
543549
prompt.atelier.total_tokens,
544550
prompt.reduction_pct,
551+
prompt.baseline.elapsed_ms + prompt.atelier.elapsed_ms,
552+
completed_at.isoformat(),
553+
prompt.baseline.total_tokens,
554+
prompt.atelier.total_tokens,
545555
json.dumps(
546556
{
547557
"tokens_saved": prompt.tokens_saved,

benchmarks/swe/swebench_eval.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"[swebench] official evaluator not installed.\n"
2727
" pip install swebench\n"
2828
" # or, with uv: uv pip install swebench\n"
29-
"Then re-run: uv run atelier-bench swe evaluate --run-dir <dir>\n"
29+
"Then re-run: uv run atelier benchmark swe evaluate --run-dir <dir>\n"
3030
"Reference: https://github.com/princeton-nlp/SWE-bench"
3131
)
3232

docs/benchmarks/phase7-2026-04-29.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ Round-by-round breakdown for `pdp` (representative; all 5 tasks behave identical
6262
cd atelier
6363
rm -rf /tmp/atelier-bench && mkdir -p /tmp/atelier-bench
6464
atelier --root /tmp/atelier-bench init
65-
atelier --root /tmp/atelier-bench benchmark --rounds 5
65+
atelier --root /tmp/atelier-bench benchmark run --rounds 5
6666
atelier --root /tmp/atelier-bench savings-detail
6767
atelier --root /tmp/atelier-bench savings
6868
```
6969

70-
For machine-readable output: `atelier --root /tmp/atelier-bench benchmark --rounds 5 --json`.
70+
For machine-readable output: `atelier --root /tmp/atelier-bench benchmark run --rounds 5 --json`.
7171

7272
---
7373

docs/core/benchmarking.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ Atelier benchmarks runtime efficiency against baseline host behavior.
44

55
## CLI
66

7-
- `atelier benchmark-core`
8-
- `atelier benchmark-runtime`
9-
- `atelier benchmark-host`
7+
- `atelier benchmark core`
8+
- `atelier benchmark runtime`
9+
- `atelier benchmark hosts`
1010

1111
## Runtime metrics
1212

@@ -38,6 +38,6 @@ Interpretation guidance:
3838

3939
## Notes
4040

41-
`benchmark-runtime` emits capability-focused efficiency metrics.
42-
`benchmark-core` runs prompt/task benchmark rounds.
43-
`benchmark-host` verifies host integration health.
41+
`benchmark runtime` emits capability-focused efficiency metrics.
42+
`benchmark core` runs prompt/task benchmark rounds.
43+
`benchmark hosts` verifies host integration health.

docs/engineering/dogfooding.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ LOCAL=1 uv run python -m pytest tests/test_swe_benchmark_harness.py -q
141141

142142
```bash
143143
atelier --root .atelier pack install src/atelier/packs/official/atelier-pack-coding-general --json
144-
atelier --root .atelier benchmark-packs --json
144+
atelier --root .atelier benchmark packs --json
145145
```
146146

147147
**Expected:** install succeeds and benchmark reports baseline vs host+core vs host+core+pack metrics.

0 commit comments

Comments
 (0)