Skip to content
Open
Changes from all commits
Commits
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
19 changes: 12 additions & 7 deletions src/harbor_adapter/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,8 @@ def _copy_eval_files(
benchmark_id: str,
model_info: "ModelInfo",
benchmark_info: "BenchmarkInfo",
*,
include_judge: bool = False,
) -> None:
"""Copy the evaluation pipeline files into target_dir.

Expand All @@ -307,7 +309,7 @@ def _copy_eval_files(
- templates/ (chat templates for all model families)
- evaluation_code/ (arenahardwriting, healthbench only)
- task_context/<*> (bfcl has bfcl_evaluation_code.py)
- contamination_judge.py (judge prompt builder)
- contamination_judge.py (judge prompt builder, tests/ only)
- metadata.json (benchmark + model info for verifier)
"""
# evaluate.py
Expand Down Expand Up @@ -337,11 +339,12 @@ def _copy_eval_files(
else:
shutil.copy(item, dst)

# contamination judge script (kept in template/environment/ as
# the canonical source, copied into both env_dir and tests_dir)
judge_src = TEMPLATE_DIR / "environment" / "contamination_judge.py"
if judge_src.exists():
shutil.copy(judge_src, target_dir / "contamination_judge.py")
# Keep judge criteria in the separate verifier. Copying the prompt into
# environment/ exposes scoring machinery to the agent being judged.
if include_judge:
judge_src = TEMPLATE_DIR / "environment" / "contamination_judge.py"
if judge_src.exists():
shutil.copy(judge_src, target_dir / "contamination_judge.py")

# metadata.json
metadata = {
Expand Down Expand Up @@ -399,7 +402,9 @@ def generate_tests(
# Eval pipeline (also baked into the agent workspace via
# environment/, but the verifier reads from /tests/ where these
# land via the verifier Dockerfile's `COPY .`).
self._copy_eval_files(tests_dir, benchmark_id, model_info, benchmark_info)
self._copy_eval_files(
tests_dir, benchmark_id, model_info, benchmark_info, include_judge=True
)

def generate_task(
self,
Expand Down