CodeContests / README.md
CharlieFRuan's picture
Upload README.md with huggingface_hub
11f66f5 verified
metadata
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 / SkyRL agentic RL training.

Dataset Description

This dataset repackages the CodeContests 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):

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

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:

@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:

@misc{openthoughts-agent,
  author = {Team, OpenThoughts-Agent},
  month = Dec,
  title = {{OpenThoughts-Agent}},
  howpublished = {https://www.openthoughts.ai/blog/agent},
  year = {2025}
}