Skip to content

Commit 80a4389

Browse files
authored
fix(cli): remove eval export option (#1349)
1 parent 63734ea commit 80a4389

18 files changed

Lines changed: 85 additions & 798 deletions

File tree

.github/workflows/evals.yml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,7 @@ jobs:
9494
"${TARGET_FLAG[@]}" \
9595
--workers 3 \
9696
--threshold ${{ steps.filter.outputs.threshold }} \
97-
--output .agentv/ci-results/artifacts \
98-
--export .agentv/ci-results/junit.xml
97+
--output .agentv/ci-results/artifacts
9998
EXIT_CODE=$?
10099
101100
echo "exit_code=$EXIT_CODE" >> "$GITHUB_OUTPUT"
@@ -104,16 +103,6 @@ jobs:
104103
if: always()
105104
run: bun run scripts/ci-summary.ts .agentv/ci-results >> "$GITHUB_STEP_SUMMARY"
106105

107-
- name: Publish JUnit test results
108-
if: always()
109-
continue-on-error: true
110-
uses: dorny/test-reporter@v1
111-
with:
112-
name: AgentV Eval Results
113-
path: .agentv/ci-results/junit.xml
114-
reporter: java-junit
115-
fail-on-error: false
116-
117106
- name: Upload eval artifacts
118107
if: always()
119108
uses: actions/upload-artifact@v4

AGENTS.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -384,8 +384,7 @@ Unit tests alone are insufficient for grader changes. After implementing or modi
384384
```bash
385385
# 1. Run the eval, writing results to a sibling *.results.jsonl file
386386
bun apps/cli/src/cli.ts eval examples/path/to/suite.eval.yaml --target azure \
387-
--output examples/path/to/suite.run \
388-
--export examples/path/to/suite.results.jsonl
387+
--output examples/path/to/suite.run
389388

390389
# 2. Assert all expected score ranges pass
391390
bun scripts/check-grader-scores.ts
@@ -396,7 +395,7 @@ The script auto-discovers `examples/**/*.grader-scores.yaml`, locates the siblin
396395
**To add score checks for a new eval:**
397396
1. Create `<eval-stem>.grader-scores.yaml` next to the eval YAML.
398397
2. Add entries for each `(test_id, grader, range)` you care about — `grader` must match a `scores[].name` value in the JSONL output, and `range.min`/`range.max` default to 0/1 if omitted.
399-
3. Run the eval with `--output <eval-stem>.run --export <eval-stem>.results.jsonl`, then run the script.
398+
3. Run the eval with `--output <eval-stem>.run`, then run the script.
400399

401400
See `examples/red-team/archetypes/coding-agent/suites/screenshot-pii-upload.grader-scores.yaml` for a concrete example.
402401

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@ agentv compare .agentv/results/runs/<timestamp>/index.jsonl
7878

7979
```bash
8080
agentv eval evals/my-eval.yaml --output ./run # writes ./run/index.jsonl
81-
agentv eval evals/my-eval.yaml --export report.html
82-
agentv eval evals/my-eval.yaml --export results.xml # JUnit XML for CI
81+
cat ./run/index.jsonl # JSONL results for scripts/CI
8382
```
8483

8584
## TypeScript SDK

apps/cli/src/commands/eval/commands/run.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export const evalRunCommand = command({
4646
out: option({
4747
type: optional(string),
4848
long: 'out',
49-
description: '[Removed: use --output <dir> and --export <file>] Former flat result path',
49+
description: '[Removed: use --output <dir>] Former flat result path',
5050
}),
5151
output: option({
5252
type: optional(string),
@@ -58,19 +58,13 @@ export const evalRunCommand = command({
5858
outputFormat: option({
5959
type: optional(string),
6060
long: 'output-format',
61-
description: '[Removed: use --export <file>] Run directories always write index.jsonl',
61+
description: '[Removed] Run directories always write index.jsonl',
6262
}),
6363
experiment: option({
6464
type: optional(string),
6565
long: 'experiment',
6666
description: 'Experiment label for canonical run output (default: default)',
6767
}),
68-
export: multioption({
69-
type: array(string),
70-
long: 'export',
71-
description:
72-
'Write additional output file(s). Format inferred from extension: .jsonl, .json, .xml, .yaml, .html (repeatable)',
73-
}),
7468
dryRun: flag({
7569
long: 'dry-run',
7670
description: 'Use mock provider responses instead of real LLM calls',
@@ -252,7 +246,6 @@ export const evalRunCommand = command({
252246
output: args.output,
253247
outputFormat: args.outputFormat,
254248
experiment: args.experiment,
255-
export: args.export,
256249
dryRun: args.dryRun,
257250
dryRunDelay: args.dryRunDelay,
258251
dryRunDelayMin: args.dryRunDelayMin,

apps/cli/src/commands/eval/json-writer.ts

Lines changed: 0 additions & 52 deletions
This file was deleted.

apps/cli/src/commands/eval/junit-writer.ts

Lines changed: 0 additions & 109 deletions
This file was deleted.
Lines changed: 1 addition & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,15 @@
1-
import path from 'node:path';
2-
31
import type { EvaluationResult } from '@agentv/core';
42

5-
import { HtmlWriter } from './html-writer.js';
6-
import { JsonWriter } from './json-writer.js';
73
import { JsonlWriter } from './jsonl-writer.js';
8-
import { JunitWriter } from './junit-writer.js';
9-
import { YamlWriter } from './yaml-writer.js';
10-
11-
export type OutputFormat = 'jsonl' | 'yaml' | 'html';
124

135
export interface OutputWriter {
146
append(result: EvaluationResult): Promise<void>;
157
close(): Promise<void>;
168
}
179

18-
export interface WriterOptions {
19-
readonly threshold?: number;
20-
}
21-
2210
export async function createOutputWriter(
2311
filePath: string,
24-
format: OutputFormat,
2512
options?: { append?: boolean },
2613
): Promise<OutputWriter> {
27-
switch (format) {
28-
case 'jsonl':
29-
return JsonlWriter.open(filePath, { append: options?.append });
30-
case 'yaml':
31-
return YamlWriter.open(filePath);
32-
case 'html':
33-
return HtmlWriter.open(filePath);
34-
default: {
35-
const exhaustiveCheck: never = format;
36-
throw new Error(`Unsupported output format: ${exhaustiveCheck}`);
37-
}
38-
}
39-
}
40-
41-
const SUPPORTED_EXTENSIONS = new Set(['.jsonl', '.json', '.xml', '.yaml', '.yml', '.html', '.htm']);
42-
43-
export function createWriterFromPath(
44-
filePath: string,
45-
options?: WriterOptions,
46-
): Promise<OutputWriter> {
47-
const ext = path.extname(filePath).toLowerCase();
48-
switch (ext) {
49-
case '.jsonl':
50-
return JsonlWriter.open(filePath);
51-
case '.json':
52-
return JsonWriter.open(filePath);
53-
case '.xml':
54-
return JunitWriter.open(filePath, { threshold: options?.threshold });
55-
case '.yaml':
56-
case '.yml':
57-
return YamlWriter.open(filePath);
58-
case '.html':
59-
case '.htm':
60-
return HtmlWriter.open(filePath);
61-
default:
62-
throw new Error(
63-
`Unsupported output file extension "${ext}". Supported: ${[...SUPPORTED_EXTENSIONS].join(', ')}`,
64-
);
65-
}
66-
}
67-
68-
export async function createMultiWriter(
69-
filePaths: readonly string[],
70-
options?: WriterOptions,
71-
): Promise<OutputWriter> {
72-
const writers = await Promise.all(filePaths.map((fp) => createWriterFromPath(fp, options)));
73-
return {
74-
async append(result: EvaluationResult): Promise<void> {
75-
await Promise.all(writers.map((w) => w.append(result)));
76-
},
77-
async close(): Promise<void> {
78-
await Promise.all(writers.map((w) => w.close()));
79-
},
80-
};
14+
return JsonlWriter.open(filePath, { append: options?.append });
8115
}

0 commit comments

Comments
 (0)