File size: 2,146 Bytes
2c791bd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# swe-commit

TaskForge A/B 线交付包。**69 个 task**,10 种语言,25 个仓库。

物理布局按语言分目录,`index/` 提供按 task、按仓库的映射,三种检索方式都可用。

```
data/<language>/<task_id>.tar.gz     # 实际数据
index/INDEX.json                     # 全量元数据(task_id / language / repo / scope / path / bytes / sha256)
index/by-language.json               # language -> [task_id]
index/by-repo.json                   # repo     -> [task_id]
index/by-task.json                   # task_id  -> 完整记录
unindexed/                           # 未进入统一清单的附属文件,原因见 INDEX.json 的 unindexed 段
query.py                             # 命令行检索
```

语言分布:go(14) typescript(12) python(9) php(8) javascript(7) ruby(6) java(4) c(3) cpp(3) rust(3)

## 拉取

```bash
pip install -U "huggingface_hub[cli]"
# 中国大陆无代理时可加: export HF_ENDPOINT=https://hf-mirror.com

# 1) 只要索引(几十 KB,先看有什么)
hf download Zeng-Weijun/swe-commit --repo-type dataset --include "index/*" --local-dir ./swe-commit

# 2) 按语言拉
hf download Zeng-Weijun/swe-commit --repo-type dataset --include "data/go/*" --local-dir ./swe-commit

# 3) 按单个 task 拉
hf download Zeng-Weijun/swe-commit --repo-type dataset \
  --include "data/java/google__gson-mc0189b727761f.tar.gz" --local-dir ./swe-commit

# 4) 全量(约 107 GiB)
hf download Zeng-Weijun/swe-commit --repo-type dataset --local-dir ./swe-commit
```

按仓库拉(先用索引取出 task 列表):

```bash
python query.py --repo axios/axios --print-paths \
  | xargs -I{} hf download Zeng-Weijun/swe-commit --repo-type dataset --include {} --local-dir ./swe-commit
```

Python:

```python
from huggingface_hub import hf_hub_download
p = hf_hub_download("Zeng-Weijun/swe-commit", "data/c/curl__curl-mc0b8dbbc63c98.tar.gz",
                    repo_type="dataset")
```

每个包解开后是 Harbor 格式任务(`task.toml` / `instruction.md` / `environment/` / `solution/` / `tests/`)。
`index/INDEX.json` 里每条都带 `sha256`,可校验内容。