Add din_integration/: SWE-bench DinD evaluation pipeline integration - #456
Open
Huafubing wants to merge 1 commit into
Open
Add din_integration/: SWE-bench DinD evaluation pipeline integration#456Huafubing wants to merge 1 commit into
Huafubing wants to merge 1 commit into
Conversation
This PR adds a self-contained 'din_integration/' subdirectory containing the swebench-dind CLI, AISBench adapter, image build templates, configuration files, and host setup scripts for running SWE-bench Verified evaluations in a Docker-in-Docker setup. Includes: - swebench_dind/ Python package (~1,900 LOC): unified CLI for orchestrator lifecycle, image baking (L1/L2), trial launch, result aggregation, and harbor agent-patch injection - aisbench_adapter/: SwebenchDindTask BaseTask subclass for AISBench config - configs/: matrix.yaml (Harbor JobConfig) + swebench_dind_3x3.py (AISBench example config) - scripts/: start_orchestrator.sh, summarize.py, filter_matrix.py, setup.sh, api_key.env.template - docs/: CLI-USAGE.md, MIGRATION.md - bin/swebench-dind: shell wrapper This is a minimum-workload PR submitted per the design documented at /docs/research/24-swebench-dind-integration-plan-A-slim-2026-08.md and /23-swebench-dind-integration-into-aisbench-2026-08.md. Path env-var refactor is intentionally deferred to keep this PR focused on content delivery; see din_integration/README.md for current path assumptions. Verified locally: 12 trial history (9 PASS / 75% pass@1) + 1 e2e-cli-11099-aider PASS (4min 49s).
Huafubing
marked this pull request as draft
August 12, 2026 06:46
Huafubing
marked this pull request as ready for review
August 12, 2026 06:46
Huafubing
marked this pull request as draft
August 12, 2026 06:46
Huafubing
marked this pull request as ready for review
August 12, 2026 06:47
Contributor
Author
|
/pr_check |
|
🚫 PR 合入质量检查未通过,PR 已被禁止合入。 未通过项:
请按上述提示整改后,重新推送(push)或评论本 PR 即可触发再次检查。 |
Contributor
Author
|
/pr_check |
|
🚫 PR 合入质量检查未通过,PR 已被禁止合入。 未通过项:
请按上述提示整改后,重新推送(push)或评论本 PR 即可触发再次检查。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Type / PR类型
Related Issue | 关联 Issue
N/A (新功能集成,无关联 issue)
🔍 Motivation / 变更动机
将
mini_matrix项目中已经验证过的 SWE-bench DinD (Docker-in-Docker) 多 agent × 多 case 评测流水线整包集成进 AISBench 仓库。SWE-bench Verified 类评测需要一个完整的容器编排栈(harbor CLI + DinD 镜像 + 多层 L1/L2/L3/L4/L5 镜像 + bind-mount 数据持久化),而 AISBench 现有的
ais_bench.benchmark_pluginsplugin 机制只支持"pip install 后单文件 import 即用"的轻量集成,无法承载这种重量级管线。本 PR 的目标:先把内容 PR 到 AISBench 仓内,作为根目录下的独立子目录
din_integration/。后续如需升级为标准 plugin,可在本 PR 基础上加setup.py+entry_points(已在din_integration/README.md中标注)。关联设计文档 (在本仓
docs/research/):23-swebench-dind-integration-into-aisbench-2026-08.md— 方案 B 设计文档(完整版)24-swebench-dind-integration-plan-A-slim-2026-08.md— 方案 A 设计文档(精简版,即本 PR 依据)📝 Modification / 修改内容
新增
din_integration/子目录,未修改 AISBench 任何既有文件:din_integration/ ← 新增 (30 files / +3,080 LOC)
├── README.md ← 路径假设 + 使用说明
├── pyproject.toml ← 包描述 (name=swebench-dind)
├── bin/swebench-dind ← shell wrapper
├── docs/
│ ├── CLI-USAGE.md ← CLI 完整命令参考
│ └── MIGRATION.md ← 老脚本 → CLI 对照表
├── swebench_dind/ ← 核心 Python 包 (~1,900 LOC)
│ ├── cli.py ← Typer 7 子命令入口
│ ├── config.py ← 单一真相源(常量 + tag 推导)
│ ├── container.py ← DinD 容器生命周期
│ ├── builder.py ← L3/L4 镜像烤制 (Jinja2)
│ ├── launcher.py ← harbor jobs start 拼装 + Rich 进度
│ ├── patcher.py ← idempotent install probe 注入
│ ├── summarizer.py ← result.json → md/csv/json
│ ├── dockerfiles/ ← L1/L2 Dockerfile 模板 (5 个 .j2)
│ └── aisbench_adapter/ ← AISBench BaseTask 适配
│ ├── task.py ← SwebenchDindTask (BaseTask 子类)
│ ├── runner.py ← subprocess 入口
│ └── result_writer.py ← harbor → AISBench schema
├── configs/
│ ├── matrix.yaml ← Harbor JobConfig (15 task × 4 agent)
│ └── swebench_dind_3x3.py ← AISBench config 示例 (3 cases × 3 agents)
└── scripts/
├── start_orchestrator.sh ← 启 DinD 容器 + bind mount
├── summarize.py ← 汇总 jobs/*/result.json
├── filter_matrix.py ← 子集过滤
├── setup.sh ← host runtime 目录创建 helper
└── api_key.env.template ← OPENAI_API_KEY 配置模板
📐 Associated Test Results / 关联测试结果
本 PR 已在本地
mini_matrix/完成端到端验证:swebench-dind launch trial --case 11099 --agent aider --wait→ PASS(4min 49s)注:本 PR 是"内容搬运",不在 AISBench CI 中运行。
din_integration/是独立的 Python 包 + 脚本集合,与 AISBench 主代码无运行时耦合。如需在 AISBench CI 中验证,需要额外的 docker-in-docker runner 配置,需与维护者讨论。无。本 PR 仅新增
din_integration/子目录,未修改 AISBench 任何既有代码(ais_bench/、tests/、setup.py、plugin_examples/全部 untouched)。下游项目不受影响。无。
din_integration/子目录不参与 AISBench 主代码的 import 路径,运行时也不会被加载(pyproject.toml中未声明 AISBench 为依赖,本包是独立可 pip install 的 Python 包)。🌟 Use cases (Optional) / 使用案例(可选)
用例 1: 多 agent × 多 case SWE-bench Verified 评测矩阵