Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
92f14f9
ci(evals): allow multi-spec harbor_package_override
nick-hollon-lc Jul 13, 2026
2d0fcd7
ci(evals): add bare-harness override to unified evals
nick-hollon-lc Jul 13, 2026
d21e958
fix(evals): use OpenAI Responses API in harbor langgraph agent
nick-hollon-lc Jul 13, 2026
66f4e81
fix(evals): pass OPENAI_API_KEY to verifier env for LLM-judge tasks
nick-hollon-lc Jul 13, 2026
d164ee2
fix(evals): supply JUDGE_* config to harbor-index verifier env
nick-hollon-lc Jul 13, 2026
6163713
fix(evals): expose env_build_timeout_multiplier for heavy cold builds
nick-hollon-lc Jul 13, 2026
e0eebf2
fix(evals): expose override_storage_mb to raise snapshot fs above 32GiB
nick-hollon-lc Jul 13, 2026
db746e9
fix(evals): drop LANGSMITH_SANDBOX_API_KEY; use LANGSMITH_API_KEY for…
nick-hollon-lc Jul 13, 2026
13abdf2
fix(evals): land unified experiments on shared datasets, not per-model
nick-hollon-lc Jul 14, 2026
f3bc5e9
feat(evals): add lite profile to unified evals
nick-hollon-lc Jul 14, 2026
9346afa
ci(evals): drop heavy bixbench tasks from lite autonomous subset
nick-hollon-lc Jul 14, 2026
8b7a6e8
ci(evals): max lite concurrency by fanning shards to ~2 tasks each
nick-hollon-lc Jul 14, 2026
ca040c0
ci(evals): shard lite one task per shard for dynamic dispatch
nick-hollon-lc Jul 14, 2026
7f6abae
ci(evals): size lite shards to saturate --concurrency (rollout-aware)
nick-hollon-lc Jul 14, 2026
ac07bc9
Revert "ci(evals): size lite shards to saturate --concurrency (rollou…
nick-hollon-lc Jul 14, 2026
1d87755
docs(evals): add unified scorecard with full and lite for luna
nick-hollon-lc Jul 14, 2026
26cb12a
ci(evals): fix evals lint formatting and sync harbor override doc
nick-hollon-lc Jul 14, 2026
1f4a733
fix(evals): annotate _build_model return type for ty
nick-hollon-lc Jul 14, 2026
4097388
Merge remote-tracking branch 'origin/main' into nh/benchmark-unified-…
nick-hollon-lc Jul 14, 2026
37ce2b8
docs(evals): note harbor override needed for one-experiment-per-model
nick-hollon-lc Jul 14, 2026
cd44681
feat(evals): raise shard MAX_SHARDS to 200 guard under GH 256 cap
nick-hollon-lc Jul 14, 2026
08c0640
feat(evals): add pack_tasks for graceful shard packing above cap
nick-hollon-lc Jul 14, 2026
f6261c2
feat(evals): derive max_parallel/model_parallel from concurrency+roll…
nick-hollon-lc Jul 14, 2026
b8abc52
feat(evals): add total-job guard as worker-pool escalation trigger
nick-hollon-lc Jul 14, 2026
8d990f6
feat(evals): build per-model flat cross-category shard matrix
nick-hollon-lc Jul 14, 2026
e9d87e3
feat(evals): enumerate per-category task names for flat matrix
nick-hollon-lc Jul 14, 2026
d7fffdd
feat(evals): emit per-model flat matrix from unified_prep
nick-hollon-lc Jul 14, 2026
afebdae
feat(evals): drive _harbor_run harbor job from a flat per-model matrix
nick-hollon-lc Jul 14, 2026
2ab14ad
feat(evals): aggregate flat-matrix shards per category tag
nick-hollon-lc Jul 14, 2026
95a6028
fix(evals): hash category slug to avoid shard-artifact collision
nick-hollon-lc Jul 14, 2026
6182c1f
feat(evals): per-model flat-pool jobs + full-profile enumerate in uni…
nick-hollon-lc Jul 14, 2026
84fcff9
fix(evals): source enumerate dataset mapping from CATEGORY_MAP to pre…
nick-hollon-lc Jul 14, 2026
9220265
feat(evals): decouple shard_parallel from n_shards for dynamic dispatch
nick-hollon-lc Jul 14, 2026
01be605
fix(evals): bound per-model flat matrix to MAX_SHARDS via proportiona…
nick-hollon-lc Jul 14, 2026
375b3f2
fix(evals): populate corpus + forward judge key on the flat per-shard…
nick-hollon-lc Jul 14, 2026
6062384
fix(evals): scope LangSmith experiment name by category
nick-hollon-lc Jul 14, 2026
e786ce5
Merge remote-tracking branch 'origin/main' into nh/benchmark-unified-…
nick-hollon-lc Jul 15, 2026
be0f26b
fix(evals): align tau3 preflight test with unconditional OpenAI key
nick-hollon-lc Jul 15, 2026
7d06a7e
Merge remote-tracking branch 'origin/nh/benchmark-unified-evals' into…
nick-hollon-lc Jul 15, 2026
068c408
fix(evals): enumerate tau3-subset from its committed task list, not t…
nick-hollon-lc Jul 15, 2026
81307f8
Merge remote-tracking branch 'origin/main' into nh/unified-evals-perf
nick-hollon-lc Jul 15, 2026
3b7bd6a
fix(evals): address open-swe review on flat-pool unified evals
nick-hollon-lc Jul 15, 2026
bcda26e
fix(evals): guard on exact packed shard count, not a loose bound
nick-hollon-lc Jul 15, 2026
68fe22b
fix(evals): score errored trials as failures, don't void the scorecard
nick-hollon-lc Jul 15, 2026
8ff9664
docs(evals): add gpt-5.6-terra full scorecard
nick-hollon-lc Jul 15, 2026
5ac11ed
revert(evals): keep shard_failure in aggregate_shards incomplete gate
nick-hollon-lc Jul 15, 2026
39aad65
docs(evals): add gpt-5.6-terra lite scorecard + wall times
nick-hollon-lc Jul 16, 2026
befe016
chore(evals): swap two slow tasks out of the lite autonomous subset
nick-hollon-lc Jul 16, 2026
05b480f
ci(evals): wait out a not-ready Docker daemon before the harbor run
nick-hollon-lc Jul 16, 2026
aed7215
docs(evals): refresh terra + luna lite scorecards for the new task set
nick-hollon-lc Jul 16, 2026
fcbb777
fix(evals): budget packed shards at full concurrency
mdrxy Jul 16, 2026
61a5f27
fix(evals): harden unified eval integrity checks
nick-hollon-lc Jul 16, 2026
9402ec7
Merge remote-tracking branch 'origin/nh/unified-evals-perf' into nh/u…
nick-hollon-lc Jul 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .github/scripts/aggregate_unified.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,15 +373,21 @@ def main(argv: list[str] | None = None) -> int:
write_outputs(
combined, args.rollouts, out_dir, os.environ.get("GITHUB_STEP_SUMMARY")
)
if not leaves:
print("::error::No usable eval leaf summaries were found; failing the run.")
return 1
# Incompleteness is surfaced per model in write_outputs (a ::warning:: plus the
# ⚠️ markers in the table) and never fails the job: a partial scorecard the
# reader can inspect beats a voided run with no output. A single errored shard
# no longer nukes the whole cross-model comparison.
models = combined["models"]
if expected_models and all(
models[model]["incomplete"] for model in expected_models
):
print(
"::error::Every expected model is incomplete; "
"no complete unified result is available."
"::warning::All expected models were flagged incomplete; the scorecard "
"below is ranked on partial data — inspect the per-model notes above."
)
return 1
return 0


Expand Down
89 changes: 89 additions & 0 deletions .github/scripts/enumerate_tasks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
"""Enumerate a category's task names for the flat shard matrix.

Reuses the exact task-name resolution the run step uses:
- local (--path) datasets: subdir basenames with a task.toml (sorted, stable),
- synthetic datasets (e.g. "tau3-subset"): a committed task list, since the
name is not a registry package and would fail a registry lookup,
- registry datasets: PackageDatasetClient manifest task_ids -> get_name().

Registry lookups need harbor installed and network; the local path is pure
stdlib. Run as a script, main() emits newline-joined names.
"""
from __future__ import annotations

import os
import sys

sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
import shard_matrix # noqa: E402


def local_task_names(local_dir: str) -> list[str]:
names = sorted(
entry.name
for entry in os.scandir(local_dir)
if entry.is_dir() and os.path.isfile(os.path.join(entry.path, "task.toml"))
)
if not names:
raise SystemExit(f"No local Harbor tasks (dirs with task.toml) under {local_dir}")
return names


def registry_task_names(dataset_ref: str) -> list[str]:
import asyncio

from harbor.registry.client.package import PackageDatasetClient

md = asyncio.run(
PackageDatasetClient().get_dataset_metadata(f"{dataset_ref}@latest")
)
names = [x for x in (shard_matrix.task_display_name(t) for t in md.task_ids) if x]
if not names:
raise SystemExit(
f"Resolved 0 usable task names from {dataset_ref}@latest "
f"({len(md.task_ids)} task ids); unexpected task-id shape."
)
return names


def tau3_subset_task_names() -> list[str]:
# "tau3-subset" is a synthetic curated view, not a registry package, so it
# cannot be resolved via the registry client. Pull its committed 30-task
# list from the same module the harbor leaf uses (single source of truth).
from deepagents_evals.tau3_subset import INCLUDE_TASKS

names = INCLUDE_TASKS.split()
if not names:
raise SystemExit(
"tau3-subset resolved to 0 tasks; "
"deepagents_evals.tau3_subset.INCLUDE_TASKS is empty."
)
return names


# Synthetic datasets resolve to a committed task list instead of a registry
# lookup, because their names are not `org/name` registry packages.
SYNTHETIC_DATASETS = {"tau3-subset": tau3_subset_task_names}


def main() -> int:
dataset_path = os.environ.get("ENUM_DATASET_PATH", "").strip()
dataset = os.environ.get("ENUM_DATASET", "").strip()
if dataset_path:
names = local_task_names(dataset_path)
elif dataset in SYNTHETIC_DATASETS:
names = SYNTHETIC_DATASETS[dataset]()
else:
names = registry_task_names(dataset)
out = os.environ.get("ENUM_OUTPUT")
text = "\n".join(names) + "\n"
if out:
with open(out, "w") as f:
f.write(text)
else:
sys.stdout.write(text)
return 0


if __name__ == "__main__":
raise SystemExit(main())
9 changes: 7 additions & 2 deletions .github/scripts/lite_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,16 @@
# Excludes the bix* bioinformatics tasks: their ~6 GB `chenzizhao/bixbench`
# image exhausts the Docker-sandbox runner disk (and fails the LangSmith
# builder). Re-add once lite runs on a sandbox that builds big images.
# `gpqadiamond-cope-rearrangement-products` and `swesmith-fix-oauth1-header-params`
# replaced `replicationbench-find-galactic-vz-peaks` and `usaco-assign-cows-to-barns`:
# both originals could run ~30-65 min (replicationbench's naive big-data script
# hits the 1h per-command timeout), defeating lite's low-cost goal. The swaps are
# <5 min and still frontier (partial-pass), re-picked on gpt-5.6-terra timing+signal.
"autonomous": [
"harbor-index/replicationbench-find-galactic-vz-peaks",
"harbor-index/gpqadiamond-cope-rearrangement-products",
"harbor-index/swebenchverified-fix-span-selector-axes-limits",
"harbor-index/omnimath-find-perfect-square-functions",
"harbor-index/usaco-assign-cows-to-barns",
"harbor-index/swesmith-fix-oauth1-header-params",
"harbor-index/featurebench-add-feature-mlflow-bedrock-autolog",
"harbor-index/build-word2vec-pipeline",
"harbor-index/tb-dna-insert",
Expand Down
23 changes: 20 additions & 3 deletions .github/scripts/shard_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@
# https://docs.github.com/actions/using-jobs/using-a-matrix-for-your-jobs
GITHUB_MATRIX_MAX = 256

# Upper bound on the shard axis itself, independent of the matrix cap. Keeps a
# fat-fingered dispatch (e.g. n_shards=1000) from producing a nonsensical run.
MAX_SHARDS = 64
# Upper bound on the shard axis itself, independent of the matrix cap. Set below
# GitHub's hard GITHUB_MATRIX_MAX so an oversized pool trips this clear error
# rather than GitHub's opaque one; pools larger than this pack multiple tasks
# per shard (see pack_tasks) instead of failing.
MAX_SHARDS = 200


class ShardConfigError(Exception):
Expand Down Expand Up @@ -184,6 +186,21 @@ def select_shard_tasks(
return [name for j, name in enumerate(selected) if j % n_shards == shard_index]


def pack_tasks(names: list[str], max_shards: int = MAX_SHARDS) -> list[list[str]]:
"""Split an ordered task list into at most ``max_shards`` contiguous groups.

One task per group when ``len(names) <= max_shards`` (the common 1-task-shard
case). Above the cap, each group holds ``ceil(n / max_shards)`` tasks so the
shard count stays legal; groups are contiguous slices of the input order, so
their union is exactly ``names`` with no reordering, duplication, or drops.
"""
n = len(names)
if n == 0:
return []
per = -(-n // max_shards) # ceil division
return [names[i : i + per] for i in range(0, n, per)]


def main() -> None:
"""Entry point for the prep job: expand the model matrix by shard.

Expand Down
41 changes: 31 additions & 10 deletions .github/scripts/test_aggregate_unified.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ def test_main_rejects_nonpositive_rollouts(
assert "--rollouts must be >= 1" in capsys.readouterr().err


def test_main_fails_only_when_every_expected_model_is_incomplete(
def test_main_fails_when_no_usable_leaf_summaries_exist(
tmp_path: Path,
monkeypatch: pytest.MonkeyPatch,
capsys: pytest.CaptureFixture[str],
Expand All @@ -505,13 +505,29 @@ def test_main_fails_only_when_every_expected_model_is_incomplete(

assert rc == 1
assert (out / "unified_summary.json").exists()
assert "::error::Every expected model is incomplete" in capsys.readouterr().out
assert (
"::error::No usable eval leaf summaries were found" in capsys.readouterr().out
)


def test_main_warns_but_succeeds_when_usable_leaves_are_incomplete(
tmp_path: Path,
monkeypatch: pytest.MonkeyPatch,
capsys: pytest.CaptureFixture[str],
) -> None:
monkeypatch.setenv("EXPECTED_MODELS", '["m"]')
monkeypatch.setenv("EXPECTED_CATEGORIES", '["context", "autonomous"]')
_leaf_dir(tmp_path, "m", "context")
assert au.main([str(tmp_path), "--rollouts", "3", "--out-dir", str(out)]) == 0

rc = au.main([str(tmp_path), "--rollouts", "3"])

def test_main_fails_when_required_leaf_has_no_tasks(
assert rc == 0
assert "::warning::All expected models were flagged incomplete" in (
capsys.readouterr().out
)


def test_main_warns_when_required_leaf_has_no_tasks(
tmp_path: Path,
monkeypatch: pytest.MonkeyPatch,
capsys: pytest.CaptureFixture[str],
Expand All @@ -533,13 +549,15 @@ def test_main_fails_when_required_leaf_has_no_tasks(

combined = json.loads((out / "unified_summary.json").read_text())
model = combined["models"]["m"]
assert rc == 1
assert rc == 0
assert model["categories"]["context"]["incomplete"] is True
assert model["incomplete"] is True
assert "::error::Every expected model is incomplete" in capsys.readouterr().out
assert "::warning::All expected models were flagged incomplete" in (
capsys.readouterr().out
)


def test_main_ignores_unexpected_complete_model_for_expected_grid_failure(
def test_main_ignores_unexpected_complete_model_for_expected_grid(
tmp_path: Path,
monkeypatch: pytest.MonkeyPatch,
capsys: pytest.CaptureFixture[str],
Expand All @@ -551,8 +569,10 @@ def test_main_ignores_unexpected_complete_model_for_expected_grid_failure(

rc = au.main([str(tmp_path), "--rollouts", "3", "--out-dir", str(out)])

assert rc == 1
assert "::error::Every expected model is incomplete" in capsys.readouterr().out
assert rc == 0
assert "::warning::All expected models were flagged incomplete" in (
capsys.readouterr().out
)


def test_main_does_not_apply_expected_grid_failure_without_expected_models(
Expand All @@ -573,7 +593,7 @@ def test_main_does_not_apply_expected_grid_failure_without_expected_models(
assert "::error::Every expected model is incomplete" not in output


def test_main_warns_and_skips_leaf_with_mismatched_rollouts(
def test_main_fails_when_all_leaves_have_mismatched_rollouts(
tmp_path: Path,
monkeypatch: pytest.MonkeyPatch,
capsys: pytest.CaptureFixture[str],
Expand All @@ -590,6 +610,7 @@ def test_main_warns_and_skips_leaf_with_mismatched_rollouts(
combined = json.loads((out / "unified_summary.json").read_text())
assert rc == 1
assert "rollouts_per_task is 2; expected 3" in output
assert "::error::No usable eval leaf summaries were found" in output
assert combined["models"]["m"]["missing_categories"] == ["context"]


Expand Down
42 changes: 42 additions & 0 deletions .github/scripts/test_enumerate_tasks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import os, sys
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
import enumerate_tasks as et # noqa: E402


def test_local_task_names_lists_dirs_with_task_toml(tmp_path):
(tmp_path / "cb-cloud-1").mkdir()
(tmp_path / "cb-cloud-1" / "task.toml").write_text("")
(tmp_path / "cb-cloud-0").mkdir()
(tmp_path / "cb-cloud-0" / "task.toml").write_text("")
(tmp_path / "not-a-task").mkdir() # no task.toml -> excluded
(tmp_path / "dataset.toml").write_text("") # file, not a task dir
assert et.local_task_names(str(tmp_path)) == ["cb-cloud-0", "cb-cloud-1"]


def test_local_task_names_empty_raises(tmp_path):
import pytest
with pytest.raises(SystemExit, match="No local Harbor tasks"):
et.local_task_names(str(tmp_path))


def test_tau3_subset_is_registered_synthetic():
# "tau3-subset" is not an org/name registry package, so it must resolve via
# a synthetic resolver rather than the registry client.
assert "tau3-subset" in et.SYNTHETIC_DATASETS


def test_main_routes_synthetic_dataset_not_registry(tmp_path, monkeypatch):
import pytest

out = tmp_path / "names.txt"
monkeypatch.setitem(et.SYNTHETIC_DATASETS, "tau3-subset", lambda: ["a", "b", "c"])
monkeypatch.setenv("ENUM_DATASET", "tau3-subset")
monkeypatch.setenv("ENUM_OUTPUT", str(out))
monkeypatch.delenv("ENUM_DATASET_PATH", raising=False)
monkeypatch.setattr(
et,
"registry_task_names",
lambda _ref: pytest.fail("registry must not be queried for a synthetic dataset"),
)
assert et.main() == 0
assert out.read_text().split() == ["a", "b", "c"]
52 changes: 50 additions & 2 deletions .github/scripts/test_shard_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,23 @@ def test_expand_matrix_rejects_real_all_set_overflow(shard: ModuleType) -> None:
shard.expand_matrix(_models(56), 5)


@pytest.mark.parametrize("bad", [0, 65, -1])
def test_expand_matrix_accepts_max_shards_boundary(shard: ModuleType) -> None:
"""n_shards == MAX_SHARDS is accepted (boundary)."""
m = {"include": [{"model": "x"}]}
out = shard.expand_matrix(m, shard.MAX_SHARDS)
assert len(out["include"]) == shard.MAX_SHARDS


def test_expand_matrix_rejects_over_max_shards(shard: ModuleType) -> None:
"""n_shards == MAX_SHARDS + 1 is rejected (out of range)."""
m = {"include": [{"model": "x"}]}
with pytest.raises(shard.ShardConfigError, match=r"1\.\.200"):
shard.expand_matrix(m, shard.MAX_SHARDS + 1)


@pytest.mark.parametrize("bad", [0, 201, -1])
def test_expand_matrix_rejects_out_of_range_shards(shard: ModuleType, bad: int) -> None:
"""n_shards must be an integer in 1..64."""
"""n_shards must be an integer in 1..200."""
with pytest.raises(shard.ShardConfigError, match="Invalid n_shards"):
shard.expand_matrix(_models(2), bad)

Expand Down Expand Up @@ -427,3 +441,37 @@ def test_main_rejects_matrix_overflow_as_exit(
with pytest.raises(SystemExit) as excinfo:
shard.main()
assert excinfo.value.code == 1


# --------------------------------------------------------------------------- #
# pack_tasks — split ordered task list into contiguous groups (comment #3)
# --------------------------------------------------------------------------- #


def test_pack_tasks_one_per_shard_under_cap(shard: ModuleType) -> None:
"""When len(names) <= max_shards, one task per group (1-task shards)."""
names = [f"t{i}" for i in range(5)]
assert shard.pack_tasks(names, max_shards=200) == [["t0"], ["t1"], ["t2"], ["t3"], ["t4"]]


def test_pack_tasks_packs_above_cap_contiguously(shard: ModuleType) -> None:
"""Above the cap, pack ceil(n/max_shards) tasks per group contiguously.

cap 2 -> ceil(5/2)=3 per group -> [t0,t1,t2],[t3,t4]
"""
names = [f"t{i}" for i in range(5)]
assert shard.pack_tasks(names, max_shards=2) == [["t0", "t1", "t2"], ["t3", "t4"]]


def test_pack_tasks_covers_every_task_disjointly(shard: ModuleType) -> None:
"""Order-preserving, no dupes, no drops (covers exactly the input set)."""
names = [f"t{i}" for i in range(203)]
groups = shard.pack_tasks(names, max_shards=200)
assert len(groups) <= 200
flat = [n for g in groups for n in g]
assert flat == names # order-preserving, no dupes, no drops


def test_pack_tasks_empty(shard: ModuleType) -> None:
"""Empty input yields empty output."""
assert shard.pack_tasks([], max_shards=200) == []
Loading