daVinci-Env: 대규모 오픈 SWE(소프트웨어 엔지니어링) 환경 합성 프레임워크
daVinci-Env: Open SWE Environment Synthesis at Scale
TL;DR Highlight
SWE 에이전트 학습용 Docker 환경 45,320개를 자동 생성하는 오픈소스 파이프라인으로, Qwen2.5-72B 기반 모델이 SWE-bench Verified 66.0% SOTA 달성.
Who Should Read
코드 자동화 에이전트나 SWE 에이전트를 학습시키려는 ML 엔지니어 및 연구자. 특히 SWE-bench 성능을 개선하거나 대규모 실행 가능한 학습 환경 구축 방법을 찾는 팀.
Core Mechanics
- 12.8k개 GitHub 저장소에서 45,320개의 실행 가능한 Docker 환경을 자동 생성 — 기존 최대 규모인 SWE-rebench(21.3k)의 2배 이상
- 멀티 에이전트 파이프라인(저장소 탐색 → Dockerfile 생성 → 평가 스크립트 생성 → 테스트 분석)이 64노드 분산 클러스터에서 약 2주 만에 전체 구축 완료
- PR-Issue 불일치(패치가 실제로 이슈를 해결 안 함)와 너무 쉬운 문제(이슈 설명에 이미 답이 있음)를 필터링하는 품질 중심 큐레이션 파이프라인 도입
- Qwen2.5-32B-Base와 72B-Base를 SFT(지도학습 파인튜닝)한 OpenSWE-32B/72B가 SWE-bench Verified에서 62.4%/66.0% 달성 — Qwen2.5 계열 SFT 방법 중 SOTA
- 학습 데이터를 늘릴수록 성능이 log-linear(로그-선형)로 개선되며 포화 없음 — 데이터 더 쌓으면 계속 성능 오름
- SWE 학습이 수학 추론(MATH-500 +12점)과 과학 벤치마크(+5점)도 함께 올려주고, 사실 기억력(MMLU)은 저하 없음
Evidence
- OpenSWE-72B SWE-Agent 스캐폴드: SWE-bench Verified 66.0% (기존 SOTA daVinci-Dev-72B 58.5% 대비 +7.5%p)
- 32B 모델 기준 OpenSWE(62.4%) vs SWE-rebench(50.2%) — 동일 설정에서 12.2%p 차이
- 72B 모델 SWE-rebench+OpenSWE 혼합 시 68.0%로 추가 +2%p 향상
- Pearson r=0.972 (72B CodeAct 스케일링 곡선) — 데이터 규모와 성능 간 강한 log-linear 상관관계 확인
How to Apply
- 공개된 45,320개 Docker 환경과 Dockerfile을 그대로 가져와 자체 SWE 에이전트 학습 데이터로 활용 — GitHub(https://github.com/GAIR-NLP/OpenSWE)에서 바로 다운로드 가능
- PR 필터링 시 '이슈 설명에 이미 수정 위치와 내용이 명시된 경우(triviality)'와 '패치가 테스트를 실제로 통과 못 하는 경우(misalignment)'를 자동 탐지해 제거하면 학습 효율 대폭 개선
- GLM-4.7 같은 모델로 동일 인스턴스를 4회 샘플링해서 1~2번 성공한 트래젝토리만 골라 SFT 데이터로 쓰면 난이도 적절한 데이터셋 구성 가능 (너무 쉽거나 너무 어려운 것 자동 제거)
Code Example
# OpenSWE Dockerfile 에이전트가 생성하는 기본 Dockerfile 구조 예시
# (openswe-python-{version} 베이스 이미지 사용)
FROM openswe-python-3.12
# 저장소를 네트워크 없이 COPY로 주입 (GitHub 레이트 리밋 회피)
COPY repo /testbed
WORKDIR /testbed/
# conda 환경 활성화 후 패키지 설치 (bash -lc 필수)
ENV DEBIAN_FRONTEND=noninteractive
RUN bash -lc 'pip install -r requirements.txt'
RUN bash -lc 'pip install -e .' # 개발 모드 설치 (로컬 코드 참조 보장)
RUN bash -lc 'pip install pytest'
# 평가 스크립트 예시 (exit code 캡처 필수)
# #!/bin/bash
# . /opt/conda/etc/profile.d/conda.sh
# conda activate testbed
# cd /testbed
# git apply -v --allow-empty - <<'EOF_114329324912'
# [CONTENT OF TEST PATCH]
# EOF_114329324912
# echo ">>>>> Start Test Output"
# pytest --no-header -rA --tb=no -p no:cacheprovider tests/test_target.py
# rc=$?
# echo ">>>>> End Test Output"
# echo "OPENSWE_EXIT_CODE=$rc"Terminology
Related Resources
Original Abstract (Expand)
Training capable software engineering (SWE) agents demands large-scale, executable, and verifiable environments that provide dynamic feedback loops for iterative code editing, test execution, and solution refinement. However, existing open-source datasets remain limited in scale and repository diversity, while industrial solutions are opaque with unreleased infrastructure, creating a prohibitive barrier for most academic research groups. We present OpenSWE, the largest fully transparent framework for SWE agent training in Python, comprising 45,320 executable Docker environments spanning over 12.8k repositories, with all Dockerfiles, evaluation scripts, and infrastructure fully open-sourced for reproducibility. OpenSWE is built through a multi-agent synthesis pipeline deployed across a 64-node distributed cluster, automating repository exploration, Dockerfile construction, evaluation script generation, and iterative test analysis. Beyond scale, we propose a quality-centric filtering pipeline that characterizes the inherent difficulty of each environment, filtering out instances that are either unsolvable or insufficiently challenging and retaining only those that maximize learning efficiency. With $891K spent on environment construction and an additional $576K on trajectory sampling and difficulty-aware curation, the entire project represents a total investment of approximately $1.47 million, yielding about 13,000 curated trajectories from roughly 9,000 quality guaranteed environments. Extensive experiments validate OpenSWE's effectiveness: OpenSWE-32B and OpenSWE-72B achieve 62.4% and 66.0% on SWE-bench Verified, establishing SOTA among Qwen2.5 series. Moreover, SWE-focused training yields substantial out-of-domain improvements, including up to 12 points on mathematical reasoning and 5 points on science benchmarks, without degrading factual recall.