CodeContests
收藏魔搭社区2026-05-18 更新2025-06-07 收录
下载链接:
https://modelscope.cn/datasets/open-thoughts/CodeContests
下载链接
链接失效反馈官方服务:
资源简介:
# 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}
}
```
本数据集采用标准输入输出(Standard Input/Output,简称Stdio)格式。以列表求和任务为例,其输入输出格式如下:
python
input = "5
1 2 3 4 5
"
output = "15"
CodeContests与CodeForces平台均采用此类格式,而MBPP与部分LiveCodeBench数据集则使用函数式输入输出格式,例如:
python
assert sum_function([1, 2, 3, 4, 5]) == 15
本项目已将函数式输入输出格式转换为标准输入输出格式,以确保所有任务格式统一。
[论文](https://arxiv.org/abs/2506.03136) | [代码](https://github.com/Gen-Verse/CURE)
## 引用
@article{wang2025cure,
title={基于强化学习的大语言模型代码生成器与单元测试器协同进化},
author={Wang, Yinjie and Yang, Ling and Tian, Ye and Shen, Ke and Wang, Mengdi},
journal={arXiv preprint arXiv:2506.03136},
year={2025}
}
@article{li2022alphacode,
author = {Yujia Li and David Choi and Junyoung Chung and Nate Kushman and Julian Schrittwieser and Rémi Leblond and Tom Eccles and James Keeling and Felix Gimeno and Agustin Dal Lago and Thomas Hubert and Peter Choy and Cyprien de Masson d’Autume and Igor Babuschkin and Xinyun Chen and Po-Sen Huang and Johannes Welbl and Sven Gowal and Alexey Cherepanov and James Molloy and Daniel J. Mankowitz and Esme Sutherland Robson and Pushmeet Kohli and Nando de Freitas and Koray Kavukcuoglu and Oriol Vinyals},
title = {基于AlphaCode实现竞赛级代码生成},
journal = {Science},
volume = {378},
number = {6624},
pages = {1092--1097},
year = {2022},
doi = {10.1126/science.abq1158},
url = {https://www.science.org/doi/10.1126/science.abq1158}
}
提供机构:
maas创建时间:
2026-02-16
搜集汇总
数据集介绍

背景与挑战
背景概述
CodeContests数据集包含9,644个代码竞赛任务,集成了沙盒环境和测试,专为Harbor/SkyRL代理强化学习训练而设计。该数据集基于deepmind/code_contests重新打包,以tar存档格式提供任务目录。
以上内容由遇见数据集搜集并总结生成



