nemotron-gym-math-advanced-calculations
收藏数据集概述:laion/nemotron-gym-math-advanced-calculations
该数据集是 NVIDIA 的 Nemotron-RL-math-advanced_calculations 数据集的 Harbor 格式转换版本,属于 NeMo-Gym 系列(NeMo-Gym collection)。数据集主要用于强化学习(Reinforcement Learning)领域的可验证奖励(verifiable-rewards)任务。
基本信息
- 许可证:CC-BY-4.0
- 任务类别:强化学习(reinforcement-learning)
- 语言:英语(en)
- 数据集规模:1,000 至 10,000 条数据(1K<n<10K)
- 验证器类型:
numeric_compare(数值容差与参考值对比)
数据结构
每条数据包含两个字段:
| 字段名 | 类型 | 描述 |
|---|---|---|
path |
字符串 | 确定性短 ID(格式:<family>-<sha256[:12]>.tar.gz) |
task_binary |
二进制 | 包含完整 Harbor 任务的 gzip 压缩 tar 包 |
Harbor 任务包内容(task_binary)
解压后的任务目录结构如下:
instruction.md # 提供给智能体的提示(Prompt) 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/内存/超时默认值)
转换特性
- 安全性保障:转换过程采用安全设计,数据集内容不会直接嵌入到 shell、Python 或 Dockerfile 中,所有值通过
tests/verifier_data.json在运行时解析。 - 基础镜固定:使用固定名称的
python:3.11-slim-bookworm基础镜像。 - 字符串净化:文本字段清理了 C0/C1 控制字符,长度有上限,tar 包路径经校验防止遍历攻击。
- 确定性的 tar 包:条目排序、
mtime=0、uid/gid=0,生成可复现的字节序列。
使用示例
Python 加载数据集: python from datasets import load_dataset
ds = load_dataset("laion/nemotron-gym-math-advanced-calculations", split="train") print(ds[0]["path"], len(ds[0]["task_binary"]))
提取单个任务并运行(使用 Harbor): bash python - <<PY import gzip, io, tarfile from datasets import load_dataset ds = load_dataset("laion/nemotron-gym-math-advanced-calculations", split="train") row = ds[0] with tarfile.open(fileobj=io.BytesIO(row["task_binary"]), mode="r:gz") as tar: tar.extractall("/tmp/math-advanced-calculations-task") PY harbor run -t /tmp/math-advanced-calculations-task -e daytona # 或 -e docker




