huggingface/Repo2RLEnv
소개
모든 저장소를 코딩 에이전트를 위한 검증 가능한 RL 환경으로 변환합니다. Hugging Face Hub에서 공유할 수 있는 Harbor 작업을 학습 및 평가에 활용할 수 있습니다.
개발 도구What you can do
- Merged PRs; no test execution during generation - pr_diff - Reproduce a change, scored by patch similarity and a correctness judge
- PRs or commits with runnable tests - pr_runtime, commit_runtime, cve_patches - Fix failing tests while preserving passing tests
- A merged Python PR needing custom task design - Tasksmith - Implement the requested behavior, checked by private tests
- Repository functions or APIs - code_instruct, equivalence_tests - Implement functionality against generated or differential tests
측정된 스타 증가
- in 24h
- +2
- in 7 days
- +9
- in 15 days
- +24
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalRepo2RLEnv
Build verifiable RL environments for coding agents.
Documentation · Quickstart · Pipelines · Datasets · Changelog
Repo2RLEnv turns repositories, pull requests, agent trajectories and task seeds into Harbor tasks. Each task includes an instruction, a starting environment, a verifier and a reference solution. Repo2RLEnv generates and reviews the tasks; Harbor runs agents against them.
flowchart LR
S["Repo, PR, trajectory or seed"] --> G["Generate a Harbor task"]
G --> V["Check controls and review"]
V -->|"Repairable defect"| R["Repair a new revision"]
R --> V
V --> E["Keep task and evidence label"]
E --> U["Evaluate, train or publish"]
Quickstart
Python 3.12+ and the GitHub CLI are required. This example generates patch-similarity tasks without Docker or model calls:
pip install repo2rlenv
gh auth login
repo2rlenv generate --repo pallets/click --pipeline pr_diff \
--pipeline-opt limit=3 --out ./tasks
repo2rlenv validate ./tasks --oracle
limit caps candidates, so this may export fewer than three tasks. validate is a
file check; it does not run the environment.
To execute these tasks, install the tested Harbor integration and start Docker.
Set ANTHROPIC_API_KEY in your shell: PR-diff grading requires a model judge,
including when checking the reference solution.
pip install 'repo2rlenv[harbor]'
harbor run -p ./tasks -a oracle --env docker \
--ve ANTHROPIC_API_KEY="$ANTHROPIC_API_KEY"
harbor run -p ./tasks -a nop --env docker \
--ve ANTHROPIC_API_KEY="$ANTHROPIC_API_KEY"
An unavailable judge leaves the trial ungraded, not a zero reward. For
test-based rewards, choose pr_runtime or Tasksmith instead.
Continue the quickstart →
What you can build
| Start with | Use | What the agent does |
|---|---|---|
| Merged PRs; no test execution during generation | pr_diff |
Reproduce a change, scored by patch similarity and a correctness judge |
| PRs or commits with runnable tests | pr_runtime, commit_runtime, cve_patches |
Fix failing tests while preserving passing tests |
| A merged Python PR needing custom task design | Tasksmith | Implement the requested behavior, checked by private tests |
| Repository functions or APIs | code_instruct, equivalence_tests |
Implement functionality against generated or differential tests |
| Recorded coding-agent sessions | trajectory_to_env |
Repair, build, extend or answer a data question derived from the session |
| Repositories, seeds, terminal recordings or existing tasks | Research recipes | Repository repair, reconstruction, terminal work, reasoning or optimization |
The recipes include SWE-smith, SWE-gen, SWE-Next, R2E, R2E-Gym, SWE-Flow, CodeMidas, SETA Seed2Synth, SETA Evol, TMax, Endless Terminals, TerminalWorld, CLI-Gym, DataArc, SCALER and FrontierSmith. Their implementation lives in this repository, with upstream credits and retained licenses.
repo2rlenv pipelines list
repo2rlenv pipelines describe repo_mutate --recipe swe_smith
Native generation uses local Docker when it executes code. Tasksmith and research recipes execute target code on Modal or Daytona workers; supported GPU trials use Modal. Choose a pipeline compares inputs, rewards and requirements.
Tasksmith: an agent that builds environments
Tasksmith uses LangGraph with Pi or OpenCode to investigate a merged PR, build its dependencies, design a human-readable task and verifier, and check the reference against the starting code. Review, verifier probes and a blind rollout then guide bounded repairs. Failed or incomplete attempts retain their diagnoses.
Start with the one-PR walkthrough, then use batch campaigns to share bootstrap work and control spending.
Check task quality
A generated task is not automatically suitable for training. Check that the reference works, the baseline fails as expected, and the verifier measures the instruction. The shared quality loop can review files and rollouts, probe the verifier and repair supported offline tasks. The optional evidence reviewer records findings with source excerpts and proposed repairs.
Tasks carry uniform labels: unverified, verified, needs_repair or blocked.
Labels describe retained evidence for that task revision; solver success is a
separate measurement. Quality and verification →
Datasets
Browse the FineEnvs collection or Harbor Visualizer. The release inventory records dataset revisions, counts and validation scope. The yield and cost report separates generation, quality review and solver costs.
HF_ML_Tasksmith contains 50 tasks from Accelerate, Diffusers, PEFT, Transformers and TRL, labeled verified under the campaign's recorded checks. Other collections include unverified tasks. Older published artifacts do not automatically receive new generator or verifier fixes.
hf download FineEnvs/HF_ML_Tasksmith tasks.tar.gz --repo-type dataset --local-dir ./hf-ml-tasksmith
tar -xzf ./hf-ml-tasksmith/tasks.tar.gz -C ./hf-ml-tasksmith
repo2rlenv tasks list ./hf-ml-tasksmith/tasks
Documentation
- Install and choose a pipeline.
- How it works: stages, execution and evidence.
- Pipeline catalog and exact prompts.
- Run with Harbor, remote workers and publishing.
- CLI reference, design RFCs and release history.
Docs describe current main; PyPI installs the latest published release. Use the
checkout installation
for unreleased changes. A text index is available at
llms.txt.
Contributing
Read CONTRIBUTING.md. For a new generator, open an issue and start with an RFC and the pipeline contribution guide.
License and credits
Repo2RLEnv's own code is Apache-2.0. Bundled adaptations retain MIT
and Apache-2.0 terms, so the distribution is Apache-2.0 AND MIT.
Third-party notices document each source and attribution.
Generated tasks and source repositories retain their own license terms.
관련 프로젝트 살펴보기
불러오는 중…