restructure: data/<language>/<task_id>.tar.gz + index/ (by-language / by-repo / by-task) + query.py
2c791bd verified |
Download README.md from Zeng-Weijun/swe-commit: direct link, hf CLI and curl.
- Browser
- Download file 2.15 kB
-
https://huggingface.co/datasets/Zeng-Weijun/swe-commit/resolve/main/README.md
- Command line
-
hf download hf://datasets/Zeng-Weijun/swe-commit/README.md
-
curl -L -o README.md https://huggingface.co/datasets/Zeng-Weijun/swe-commit/resolve/main/README.md
2.15 kB
| # 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`,可校验内容。 | |