aaabiao commited on
Commit
0fe234d
·
verified ·
1 Parent(s): 49f88e3

Upload RepoFactory initial 1,000-environment release: readme

Browse files
Files changed (1) hide show
  1. README.md +161 -0
README.md ADDED
@@ -0,0 +1,161 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ pretty_name: RepoFactory-1000
3
+ language:
4
+ - en
5
+ size_categories:
6
+ - 1K<n<10K
7
+ task_categories:
8
+ - text-generation
9
+ tags:
10
+ - sft-environment
11
+ - pre-evolution
12
+ - harbor
13
+ - code
14
+ - software-engineering
15
+ - repository-generation
16
+ - long-horizon
17
+ - python
18
+ - docker
19
+ viewer: false
20
+ ---
21
+
22
+ # RepoFactory
23
+
24
+ **1,000 verifiable environments for full-repository generation.**
25
+
26
+ RepoFactory constructs training environments for long-horizon coding agents from real-world software projects. Each task asks an agent to reconstruct a complete, working repository from a natural language specification and API guide. The agent works in a fresh workspace with dependencies installed, and its implementation is evaluated through executable tests.
27
+
28
+ This release provides **1,000 environments before applying RepoFactory's Environment Evolution Loop**, together with their corresponding Docker images. The broader RepoFactory collection described in the paper contains 10,159 environments. The released tasks primarily cover Python projects and can be used to collect coding trajectories, train agents with executable feedback, and study repository reconstruction.
29
+
30
+ The environments use the [Harbor task format](https://github.com/harbor-framework/harbor). Each package includes the task specification, runtime configuration, oracle implementation, and verifier. Oracle implementations and reference tests are included for reproduction and validation and must remain separate from the solving agent's workspace.
31
+
32
+ ## Release contents
33
+
34
+ | Item | Contents |
35
+ | --- | --- |
36
+ | Environments | 1,000, identified by `000001` through `001000` |
37
+ | Task packages | `instances/<id>/instance.tar.gz` |
38
+ | Runtime images | `images/<id>.tar` |
39
+ | Image tags | `repofactory/task:<id>` |
40
+ | Agent workspace | `/workspace` |
41
+ | Task package download size | Approximately 4.95 GiB in total |
42
+ | Image download size | Approximately 565.8 GiB in total |
43
+
44
+ Each instance can be downloaded and used independently. Start with one task before downloading the complete image collection. Additional disk space is needed for extracted task files, imported Docker layers, and trial workspaces.
45
+
46
+ ```text
47
+ .
48
+ ├── README.md
49
+ ├── assets/
50
+ │ └── ledgerlens_example.png
51
+ ├── instances/
52
+ │ ├── 000001/
53
+ │ │ └── instance.tar.gz
54
+ │ ├── 000002/
55
+ │ │ └── instance.tar.gz
56
+ │ └── ...
57
+ └── images/
58
+ ├── 000001.tar
59
+ ├── 000002.tar
60
+ └── ...
61
+ ```
62
+
63
+ The files under `images/` are Docker image archives exported for `docker load`.
64
+
65
+ ## Quickstart
66
+
67
+ The example below runs instance `000001` locally. It requires Docker with Linux/amd64 container support and a Python environment compatible with Harbor. See the [Harbor installation guide](https://docs.harborframework.com/getting-started/installation) for host requirements.
68
+
69
+ ### 1. Install the tools
70
+
71
+ ```bash
72
+ python -m pip install --upgrade huggingface_hub harbor
73
+ ```
74
+
75
+ ### 2. Download one instance and its image
76
+
77
+ Set `HF_DATASET_REPO` to the repository ID shown on this dataset's Hugging Face page.
78
+
79
+ ```bash
80
+ export HF_DATASET_REPO="YOUR_ORG/YOUR_DATASET"
81
+
82
+ hf download "$HF_DATASET_REPO" \
83
+ instances/000001/instance.tar.gz \
84
+ images/000001.tar \
85
+ --repo-type dataset \
86
+ --local-dir ./repofactory
87
+
88
+ cd repofactory
89
+ ```
90
+
91
+ The [Hugging Face download CLI](https://huggingface.co/docs/huggingface_hub/guides/cli#hf-download) supports downloading individual files without fetching the complete release.
92
+
93
+ ### 3. Extract the task and load the image
94
+
95
+ ```bash
96
+ mkdir -p tasks
97
+ tar -xzf instances/000001/instance.tar.gz -C tasks
98
+ docker load --input images/000001.tar
99
+ docker image inspect repofactory/task:000001
100
+ ```
101
+
102
+ The extracted task is located at `tasks/000001/`. Its `task.toml` refers to the image loaded above. Harbor can use this prebuilt image directly. Rebuilding `environment/Dockerfile` instead requires its separately referenced `repofactory/base:000001` image.
103
+
104
+ ### 4. Check the oracle and initial workspace
105
+
106
+ ```bash
107
+ harbor run --path tasks/000001 --agent oracle --env docker
108
+ harbor run --path tasks/000001 --agent nop --env docker
109
+ ```
110
+
111
+ The oracle agent copies the reference implementation into the workspace. The `nop` agent leaves the initial workspace unchanged. The intended validity criterion is full reward for the oracle and zero reward for the unchanged workspace; inspect both trial results and verifier logs when validating a local setup.
112
+
113
+ ### 5. Run a coding agent
114
+
115
+ For example, run an agent through the Claude Code harness:
116
+
117
+ ```bash
118
+ harbor run \
119
+ --path tasks/000001 \
120
+ --agent claude-code \
121
+ --model "YOUR_MODEL_ID" \
122
+ --env docker
123
+ ```
124
+
125
+ Replace `YOUR_MODEL_ID` and configure credentials for the selected agent and model provider. Agent selection, model configuration, and parallel execution are described in the [Harbor CLI documentation](https://github.com/harbor-framework/docs/blob/main/cli/run.mdx).
126
+
127
+ ## Instance format
128
+
129
+ Every task archive expands into a directory named after its six-digit instance ID:
130
+
131
+ ```text
132
+ 000001/
133
+ ├── task.toml
134
+ ├── instruction.md
135
+ ├── start.sh
136
+ ├── environment/
137
+ │ ├── Dockerfile
138
+ │ └── start.md
139
+ ├── solution/
140
+ │ ├── solve.sh
141
+ │ └── oracle/
142
+ └── tests/
143
+ ├── test.sh
144
+ ├── config.json
145
+ └── reference/
146
+ ```
147
+
148
+ | Path | Purpose |
149
+ | --- | --- |
150
+ | `task.toml` | Task metadata, timeouts, resource limits, and prebuilt image tag |
151
+ | `instruction.md` | Agent-facing instructions for reconstructing the project |
152
+ | `environment/start.md` | Functional specification, repository structure, public interfaces, and usage examples; copied to `/workspace/start.md` |
153
+ | `environment/Dockerfile` | Runtime image recipe and initial workspace setup |
154
+ | `start.sh` | Startup configuration, including restrictions on common code-hosting domains |
155
+ | `solution/oracle/` | Reference implementation for oracle validation |
156
+ | `solution/solve.sh` | Oracle entrypoint that copies the implementation to `/workspace` |
157
+ | `tests/config.json` | Reference test paths, test commands, fixtures, package files, and configured test count |
158
+ | `tests/test.sh` | Verifier entrypoint that restores evaluation resources and runs the configured tests |
159
+ | `tests/reference/` | Reference tests and supporting evaluation files |
160
+
161
+ Resource limits and timeouts are specified in each task's `task.toml`. For instance `000001`, the configuration allows 2 CPUs, 8 GiB of memory, and 20 GiB of storage, with timeouts of 60 minutes for the agent, 20 minutes for verification, and 30 minutes for environment construction.