open-thoughts/CodeContests
收藏Hugging Face2026-02-16 更新2026-04-05 收录
下载链接:
https://hf-mirror.com/datasets/open-thoughts/CodeContests
下载链接
链接失效反馈官方服务:
资源简介:
---
dataset_info:
- config_name: default
features:
- name: path
dtype: string
- name: task_binary
dtype: binary
splits:
- name: train
num_bytes: 44246842
num_examples: 9644
download_size: 44246842
dataset_size: 44246842
---
# CodeContests
A dataset of **9,644** code contest tasks with sandbox environments and tests, formatted for [Harbor](https://github.com/open-thoughts/OpenThoughts-Agent) / [SkyRL](https://github.com/NovaSky-AI/SkyRL) agentic RL training.
## Dataset Description
- **Source:** [DCAgent/code-contests-sandboxes-with-tests](https://huggingface.co/datasets/DCAgent/code-contests-sandboxes-with-tests)
- **Original dataset:** [deepmind/code_contests](https://huggingface.co/datasets/deepmind/code_contests)
This dataset repackages the [CodeContests](https://github.com/google-deepmind/code_contests) competitive programming benchmark into the Harbor task format. Each row contains a task directory packed as a tar archive with instructions, environment (Dockerfile), and test verifiers suitable for agentic RL training with sandboxed execution.
## Schema
| Column | Type | Description |
|--------|------|-------------|
| `path` | string | Task identifier (e.g. "code_contests-0000") |
| `task_binary` | binary | Gzip-compressed tar archive of the task directory |
## Interacting with the Data
To explore the tasks locally, you can extract them into a readable format using the following commands (make sure `pyarrow` is installed):
```bash
curl -L -o extract_parquet_tasks.py \
"https://huggingface.co/datasets/open-thoughts/CodeContests/raw/main/extract_parquet_tasks.py"
curl -L -o tasks.parquet \
"https://huggingface.co/datasets/open-thoughts/CodeContests/resolve/main/tasks.parquet"
python extract_parquet_tasks.py tasks.parquet ./extracted_tasks
```
## Usage with SkyRL + Harbor
```bash
python examples/harbor/prepare_harbor_dataset.py --dataset open-thoughts/CodeContests
```
This will download and extract the tasks to `~/data/harbor/CodeContests/`.
## Citation
If you use this dataset, please cite the original CodeContests paper:
```bibtex
@article{li2022competition,
title={Competition-Level Code Generation with AlphaCode},
author={Li, Yujia and Choi, David and Chung, Junyoung and Kushman, Nate and Schrittwieser, Julian and Leblond, R{\'e}mi and Eccles, Tom and Keeling, James and Gimeno, Felix and Dal Lago, Agustin and Hubert, Thomas and Choy, Peter and de Masson d'Autume, Cyprien and Babuschkin, Igor and Chen, Xinyun and Huang, Po-Sen and Welbl, Johannes and Gowal, Sven and Cherepanov, Alexey and Molloy, James and Mankowitz, Daniel J. and Sutherland Robson, Esme and Kohli, Pushmeet and de Freitas, Nando and Kavukcuoglu, Koray and Vinyals, Oriol},
journal={Science},
volume={378},
number={6624},
pages={1092--1097},
year={2022},
publisher={American Association for the Advancement of Science},
doi={10.1126/science.abq1158}
}
```
And the OpenThoughts-Agent project:
```bibtex
@misc{openthoughts-agent,
author = {Team, OpenThoughts-Agent},
month = Dec,
title = {{OpenThoughts-Agent}},
howpublished = {https://www.openthoughts.ai/blog/agent},
year = {2025}
}
```
数据集信息:
- 配置名称:默认
特征:
- 名称:路径(path),数据类型:字符串(string)
- 名称:任务二进制(task_binary),数据类型:二进制(binary)
划分:
- 名称:训练集(train),字节数:44246842,样本数:9644
下载大小:44246842
数据集大小:44246842
# 代码竞赛(CodeContests)
本数据集包含9644个搭载沙箱环境与测试用例的编程竞赛任务,专为[Harbor](https://github.com/open-thoughts/OpenThoughts-Agent) / [SkyRL](https://github.com/NovaSky-AI/SkyRL)的智能体强化学习训练打造。
## 数据集说明
- **数据来源**:[DCAgent/code-contests-sandboxes-with-tests](https://huggingface.co/datasets/DCAgent/code-contests-sandboxes-with-tests)
- **原始数据集**:[deepmind/code_contests](https://huggingface.co/datasets/deepmind/code_contests)
本数据集将[CodeContests](https://github.com/google-deepmind/code_contests)竞赛编程基准数据集重新封装为Harbor任务格式。每一行数据均包含一个打包为tar归档文件的任务目录,内置任务说明、运行环境(Dockerfile)以及适配沙箱执行的智能体强化学习训练用测试验证程序。
## 数据模式
| 列名 | 数据类型 | 说明 |
|--------|------|-------------|
| `path` | 字符串(string) | 任务标识符(示例:"code_contests-0000") |
| `task_binary` | 二进制(binary) | 任务目录的Gzip压缩tar归档文件 |
## 数据本地交互方式
若需在本地浏览任务,可通过以下命令将其提取为可读格式(请确保已安装`pyarrow`):
bash
curl -L -o extract_parquet_tasks.py
"https://huggingface.co/datasets/open-thoughts/CodeContests/raw/main/extract_parquet_tasks.py"
curl -L -o tasks.parquet
"https://huggingface.co/datasets/open-thoughts/CodeContests/resolve/main/tasks.parquet"
python extract_parquet_tasks.py tasks.parquet ./extracted_tasks
## 适配SkyRL与Harbor的使用流程
bash
python examples/harbor/prepare_harbor_dataset.py --dataset open-thoughts/CodeContests
执行该命令后,数据集将自动下载并解压至`~/data/harbor/CodeContests/`目录。
## 引用规范
若使用本数据集,请同时引用原始CodeContests论文及OpenThoughts-Agent项目:
### 原始CodeContests论文引用
bibtex
@article{li2022competition,
title={Competition-Level Code Generation with AlphaCode},
author={Li, Yujia and Choi, David and Chung, Junyoung and Kushman, Nate and Schrittwieser, Julian and Leblond, R{é}mi and Eccles, Tom and Keeling, James and Gimeno, Felix and Dal Lago, Agustin and Hubert, Thomas and Choy, Peter and de Masson d'Autume, Cyprien and Babuschkin, Igor and Chen, Xinyun and Huang, Po-Sen and Welbl, Johannes and Gowal, Sven and Cherepanov, Alexey and Molloy, James and Mankowitz, Daniel J. and Sutherland Robson, Esme and Kohli, Pushmeet and de Freitas, Nando and Kavukcuoglu, Koray and Vinyals, Oriol},
journal={Science},
volume={378},
number={6624},
pages={1092--1097},
year={2022},
publisher={American Association for the Advancement of Science},
doi={10.1126/science.abq1158}
}
### OpenThoughts-Agent项目引用
bibtex
@misc{openthoughts-agent,
author={Team, OpenThoughts-Agent},
month={Dec},
title={{OpenThoughts-Agent}},
howpublished={https://www.openthoughts.ai/blog/agent},
year={2025}
}
提供机构:
open-thoughts


