nemotron-gym-math-openmathreasoning
收藏资源简介:
本数据集是原始数据集nvidia/Nemotron-RL-math-OpenMathReasoning的Harbor格式转换版本,属于NVIDIA NeMo-Gym集合的一部分。它专为强化学习任务设计,核心内容围绕数学推理问题。数据采用Harbor任务格式封装,每条记录包含两个字段:`path`(格式为`<family>-<sha256[:12]>.tar.gz`的确定性短ID字符串)和`task_binary`(存储完整Harbor任务的gzip压缩tar二进制数据)。每个任务包内部遵循标准Harbor布局,包含:给智能体的文本提示(`instruction.md`)、基于`python:3.11-slim-bookworm`的Docker环境配置、验证脚本(`tests/test.sh`, `tests/verifier.py`)、验证输入数据(`tests/verifier_data.json`)、记录来源数据集、行索引和任务家族等信息的元数据(`metadata.json`),以及CPU/内存/超时等默认配置(`task.toml`)。验证器采用math_boxed家族,其工作原理是从模型输出中提取oxed{}格式的数学表达式,并使用sympy库与标准答案进行比较。数据集转换过程强调安全性,确保数据集内容不会插入shell、Python或Dockerfile源代码,所有值通过JSON文件传递;基础镜像固定;进行输入验证和清理;并生成确定性的tarball以实现可复现性。数据集规模属于100K<n<1M类别,适用于训练和评估在数学推理环境中进行交互的强化学习智能体。
This dataset is a Harbor format conversion version of the original dataset nvidia/Nemotron-RL-math-OpenMathReasoning, belonging to the NVIDIA NeMo-Gym collection. It is specifically designed for reinforcement learning tasks, with core content revolving around mathematical reasoning problems. The data is encapsulated in the Harbor task format, with each record containing two fields: `path` (a deterministic short ID string in the format `<family>-<sha256[:12]>.tar.gz`) and `task_binary` (gzip-compressed tar binary data storing the complete Harbor task). Each task package internally follows the standard Harbor layout, including: text prompts for the agent (`instruction.md`), Docker environment configuration based on `python:3.11-slim-bookworm`, verification scripts (`tests/test.sh`, `tests/verifier.py`), verification input data (`tests/verifier_data.json`), metadata (`metadata.json`) recording source dataset, row index, and task family information, and default configurations for CPU/memory/timeout (`task.toml`). The verifier uses the math_boxed family, which works by extracting mathematical expressions in the oxed{} format from model outputs and comparing them with standard answers using the sympy library. The dataset conversion process emphasizes security, ensuring that dataset content does not insert shell, Python, or Dockerfile source code; all values are passed through JSON files; the base image is fixed; input validation and cleaning are performed; and deterministic tarballs are generated for reproducibility. The dataset scale falls into the 100K<n<1M category and is suitable for training and evaluating reinforcement learning agents interacting in mathematical reasoning environments.
数据集概述
基本信息
- 数据集名称:
laion/nemotron-gym-math-openmathreasoning - 许可证: CC-BY-4.0
- 语言: 英语
- 任务类别: 强化学习
- 数据规模: 100K < n < 1M
数据格式
每个数据行包含以下列:
| 列名 | 类型 | 描述 |
|---|---|---|
path |
字符串 | 确定性短ID(格式:<family>-<sha256[:12]>.tar.gz) |
task_binary |
二进制 | 包含完整Harbor任务的gzip压缩tar包 |
Harbor任务布局
压缩包内部遵循Harbor的任务布局:
instruction.md— 给智能体的提示environment/Dockerfile— 基于python:3.11-slim-bookworm基础镜像及任务依赖tests/test.sh— 验证器入口(输出到/logs/verifier/reward.txt)tests/verifier.py— 验证器实现(内嵌、确定性)tests/verifier_data.json— 每个任务的验证器输入(JSON格式,无代码注入)metadata.json— 来源信息:源数据集、行索引、类别等task.toml— 标准Harbor任务配置(CPU、内存、超时默认值)
验证器类别
math_boxed — 从oxed{…}中提取内容,使用SymPy与标准答案进行比较。
来源与衍生
本数据集是 nvidia/Nemotron-RL-math-OpenMathReasoning 的Harbor格式转换版本,属于NVIDIA的 NeMo-Gym集合。
转换特点
- 安全构建: 数据集内容从不注入到shell、Python或Dockerfile源码中,所有值通过
tests/verifier_data.json(JSON格式)在运行时解析。 - 基础镜像固定: 使用名称固定的
python:3.11-slim-bookworm镜像,pip依赖经过严格白名单正则验证。 - 文本字段处理: 移除C0/C1控制字符并对长度进行限制,tarball路径经过遍历/NUL/绝对路径攻击验证。
- 确定性打包: tarball保证确定性(条目排序、
mtime=0、uid/gid=0),字节可复现。
使用示例
加载数据集: python from datasets import load_dataset ds = load_dataset("laion/nemotron-gym-math-openmathreasoning", split="train") print(ds[0]["path"], len(ds[0]["task_binary"]))
运行单个任务: bash python - <<PY import gzip, io, tarfile from datasets import load_dataset ds = load_dataset("laion/nemotron-gym-math-openmathreasoning", split="train") row = ds[0] with tarfile.open(fileobj=io.BytesIO(row["task_binary"]), mode="r:gz") as tar: tar.extractall("/tmp/math-openmathreasoning-task") PY harbor run -t /tmp/math-openmathreasoning-task -e daytona # 或 -e docker




