pi-evals 0.8.0 → 0.8.1
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.
- package/CHANGELOG.md +4 -0
- package/dist/exp/validity.js +4 -2
- package/package.json +1 -1
- package/src/exp/validity.ts +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.8.1
|
|
4
|
+
|
|
5
|
+
- `exp check` lets a reference check run as long as the task's `check_timeout_s` (default limit stays 180 s), so tasks with slow verifiers, such as SWE-Bench Pro's Go and JS suites in Docker, can pass the gate.
|
|
6
|
+
|
|
3
7
|
## 0.8.0
|
|
4
8
|
|
|
5
9
|
- New CLI command `pi-evals exp` runs controlled, paired experiments: the same tasks under two arms (for example without and with anchorloop) with the same model, so a difference can be put down to the arm. `exp check` confirms a task's base fails its check and its reference passes it 3 of 3; `exp run` runs k trials per task and arm, each with one identical follow-up turn; `exp grade` regrades stored trials after a grader fix; `exp show` gives pass@1, pass^k, process rates, cost and minutes per trial, and B − A with a paired cluster-bootstrap 95% CI over tasks.
|
package/dist/exp/validity.js
CHANGED
|
@@ -9,7 +9,9 @@ import { tmpdir } from "node:os";
|
|
|
9
9
|
import { join } from "node:path";
|
|
10
10
|
import { cloneTree } from "./fixture.js";
|
|
11
11
|
import { promptCreditsAnchor, shouldNotOutcome } from "./grade.js";
|
|
12
|
+
/** A reference check slower than this fails the gate; a task that sets check_timeout_s raises it to that. */
|
|
12
13
|
const LIMIT_MS = 180_000;
|
|
14
|
+
const limitMs = (task) => (task.check_timeout_s ? task.check_timeout_s * 1000 : LIMIT_MS);
|
|
13
15
|
function check(task, work) {
|
|
14
16
|
rmSync(join(work, ".exp-check"), { recursive: true, force: true });
|
|
15
17
|
cpSync(join(task.dir, "check"), join(work, ".exp-check"), { recursive: true });
|
|
@@ -66,8 +68,8 @@ export function gate(task, fixture, options = {}) {
|
|
|
66
68
|
const r = check(task, ref);
|
|
67
69
|
if (r.exit !== 0)
|
|
68
70
|
fail(`reference run ${i} fails the check (exit ${r.exit}: ${r.tail})`);
|
|
69
|
-
else if (r.ms >
|
|
70
|
-
fail(`reference run ${i} takes ${(r.ms / 1000).toFixed(0)} s (limit ${
|
|
71
|
+
else if (r.ms > limitMs(task))
|
|
72
|
+
fail(`reference run ${i} takes ${(r.ms / 1000).toFixed(0)} s (limit ${limitMs(task) / 1000} s)`);
|
|
71
73
|
else
|
|
72
74
|
lines.push(`ok reference run ${i} passes (${(r.ms / 1000).toFixed(1)} s)`);
|
|
73
75
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-evals",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "Usage and process records for pi: how skills, packages, ask-user, monitors and subagents are used, back-filled from past sessions, with a static report and an evals_query tool",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
package/src/exp/validity.ts
CHANGED
|
@@ -17,7 +17,9 @@ export interface GateResult {
|
|
|
17
17
|
lines: string[];
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
/** A reference check slower than this fails the gate; a task that sets check_timeout_s raises it to that. */
|
|
20
21
|
const LIMIT_MS = 180_000;
|
|
22
|
+
const limitMs = (task: Task) => (task.check_timeout_s ? task.check_timeout_s * 1000 : LIMIT_MS);
|
|
21
23
|
|
|
22
24
|
function check(task: Task, work: string): { exit: number | null; ms: number; tail: string } {
|
|
23
25
|
rmSync(join(work, ".exp-check"), { recursive: true, force: true });
|
|
@@ -64,7 +66,7 @@ export function gate(task: Task, fixture: string, options: { runs?: number } = {
|
|
|
64
66
|
for (let i = 1; i <= (options.runs ?? 3); i++) {
|
|
65
67
|
const r = check(task, ref);
|
|
66
68
|
if (r.exit !== 0) fail(`reference run ${i} fails the check (exit ${r.exit}: ${r.tail})`);
|
|
67
|
-
else if (r.ms >
|
|
69
|
+
else if (r.ms > limitMs(task)) fail(`reference run ${i} takes ${(r.ms / 1000).toFixed(0)} s (limit ${limitMs(task) / 1000} s)`);
|
|
68
70
|
else lines.push(`ok reference run ${i} passes (${(r.ms / 1000).toFixed(1)} s)`);
|
|
69
71
|
}
|
|
70
72
|
} finally {
|