遇见数据集

avidanborisov/leetcode2000-rl

收藏
Hugging Face2026-04-17 更新2026-04-26 收录
官方服务:

资源简介:

--- pretty_name: LeetCode2000-RL license: apache-2.0 size_categories: - 1K<n<10K task_categories: - text-generation language: - en tags: - code - python - reinforcement-learning - algorithms source_datasets: - newfacade/LeetCodeDataset configs: - config_name: default data_files: - split: train path: train.parquet - split: validation path: validation.parquet - split: test path: test.parquet --- # LeetCode2000-RL LeetCode2000-RL contains 2000 LeetCode programming tasks with one Python solution per task, normalized correctness test cases, and speed-test inputs with measured runtimes. It is a curated derivative of [`newfacade/LeetCodeDataset`](https://huggingface.co/datasets/newfacade/LeetCodeDataset). New LLM-generated solutions and runtime-focused test cases were used to benchmark candidate solutions, replace slower solutions when faster correct variants were found, and select the final solution for each task. The final dataset was then re-validated end-to-end. The dataset is intended for RL training with a Python execution environment, as well as evaluation and code-optimization experiments. ## Splits | Split | Rows | |---|---:| | train | 1600 | | validation | 200 | | test | 200 | Splits are stratified by difficulty and runtime distribution. ## Fields - `task_id` — stable task slug - `problem` — cleaned problem statement - `constraints` — extracted constraints block - `difficulty` — Easy / Medium / Hard - `tags` — topic tags - `entrypoint` — method name to implement - `starter_code` — Python starter scaffold - `test_cases` — correctness cases as `{"kwargs": ..., "expected": ...}` - `speed_tests` — runtime-focused inputs as `{"input_expr": "{'kwargs': ...}", "runtime_ms": ...}` - `solution` — Python solution - `solution_runtime_ms` — total execution time of the solution across correctness + speed tests Runtimes were measured on a specific machine and reflect execution time inside the solution itself. For the Parquet viewer/loading path, `test_cases` are stored as `kwargs_json` / `expected_json` strings for schema stability. ## Attribution Curated derivative of [`newfacade/LeetCodeDataset`](https://huggingface.co/datasets/newfacade/LeetCodeDataset). ## Citation If you use this dataset, please cite both the upstream source and this derivative. **Upstream** ```bibtex @article{xia2025leetcodedataset, title={LeetCodeDataset: A Temporal Dataset for Robust Evaluation and Efficient Training of Code LLMs}, author={Yunhui Xia and Wei Shen and Yan Wang and Jason Klein Liu and Huifeng Sun and Siyue Wu and Jian Hu and Xiaolong Xu}, journal={arXiv preprint arXiv:2504.14655}, year={2025}, url={https://arxiv.org/abs/2504.14655} } ``` **This dataset** ```bibtex @misc{borisov2026leetcode2000rl, title={LeetCode2000-RL}, author={Avidan Borisov}, year={2026}, howpublished={Hugging Face dataset}, url={https://huggingface.co/datasets/avidanborisov/leetcode2000-rl}, note={Curated set of 2000 LeetCode problems with high-quality Python solutions, correctness tests, and speed tests} } ```

--- 数据集名称:LeetCode2000-RL 许可证:Apache-2.0 数据量范围:1000 < 样本数 < 10000 任务类别:文本生成 语言:英语 标签:代码、Python、强化学习(Reinforcement Learning, RL)、算法 源数据集:newfacade/LeetCodeDataset 配置: - 配置名称:default 数据文件: - 分割集:train,路径:train.parquet - 分割集:validation,路径:validation.parquet - 分割集:test,路径:test.parquet --- # LeetCode2000-RL LeetCode2000-RL 包含2000道LeetCode编程题,每道题附带一份Python题解、标准化的正确性测试用例,以及带有实测运行时长的性能测试输入。该数据集是 [`newfacade/LeetCodeDataset`](https://huggingface.co/datasets/newfacade/LeetCodeDataset) 的精选衍生版本。我们采用大语言模型(Large Language Model, LLM)生成的题解与聚焦运行性能的测试用例,对候选题解进行基准测试;在找到更快速的正确变体时替换原有较慢的题解,并为每道题选定最终题解。随后对最终数据集完成了端到端的重新验证。 本数据集旨在适配基于Python执行环境的强化学习训练,同时也可用于代码优化实验与模型评估。 ## 数据集分割 | 分割集 | 样本数 | |---|---:| | train | 1600 | | validation | 200 | | test | 200 | 分割集按照题目难度与运行时分布进行分层采样。 ## 数据字段 - `task_id` — 稳定的题目标识符 - `problem` — 清洗后的题目描述文本 - `constraints` — 提取的约束条件块 - `difficulty` — 难度等级,分为简单、中等、困难 - `tags` — 题目主题标签 - `entrypoint` — 待实现的方法名称 - `starter_code` — Python初始脚手架代码 - `test_cases` — 正确性测试用例,格式为`{"kwargs": ..., "expected": ...}` - `speed_tests` — 聚焦运行性能的测试输入,格式为`{"input_expr": "{'kwargs': ...}", "runtime_ms": ...}` - `solution` — Python题解代码 - `solution_runtime_ms` — 该题解在正确性测试与性能测试中的总执行时长(单位:毫秒) 运行时参数在特定硬件设备上测得,仅反映题解代码本身的执行耗时。对于Parquet格式的查看与加载场景,`test_cases`以`kwargs_json`与`expected_json`字符串形式存储,以保障数据模式的稳定性。 ## 归属声明 本数据集为 [`newfacade/LeetCodeDataset`](https://huggingface.co/datasets/newfacade/LeetCodeDataset) 的精选衍生版本。 ## 引用声明 若使用本数据集,请同时引用上游源数据集与本衍生数据集。 **上游源数据集** bibtex @article{xia2025leetcodedataset, title={LeetCodeDataset: A Temporal Dataset for Robust Evaluation and Efficient Training of Code LLMs}, author={Yunhui Xia and Wei Shen and Yan Wang and Jason Klein Liu and Huifeng Sun and Siyue Wu and Jian Hu and Xiaolong Xu}, journal={arXiv preprint arXiv:2504.14655}, year={2025}, url={https://arxiv.org/abs/2504.14655} } **本数据集** bibtex @misc{borisov2026leetcode2000rl, title={LeetCode2000-RL}, author={Avidan Borisov}, year={2026}, howpublished={Hugging Face dataset}, url={https://huggingface.co/datasets/avidanborisov/leetcode2000-rl}, note={Curated set of 2000 LeetCode problems with high-quality Python solutions, correctness tests, and speed tests} }

提供机构:
avidanborisov
二维码
社区交流群
二维码
科研交流群
商业服务