python-logic-assertions
收藏资源简介:
PyLogic-Verified-10k 是一个确定性合成的 Python 逻辑与断言数据集,包含 100% 语法验证的 Python 条件逻辑、多变量状态变化和真实单元测试断言。该数据集旨在用于微调代码大语言模型(LLM),以提升模型在多变量边界推理和执行状态跟踪方面的能力。免费预览版包含 10,000 条经过验证的执行对,格式为 Apache Parquet(Snappy 压缩)。完整商业版包含 100,000 条样本,并提供 Parquet 和 JSONL 两种格式。数据集的字段包括:id(唯一确定性样本标识符)、instruction(自然语言代码生成提示)、code(可执行的 Python 函数实现)和 unit_test(真实单元测试套件,包含 assert 语句)。数据集适用于文本生成任务,尤其适合用于代码生成、程序合成、测试生成等场景。许可证为 CC-BY-NC 4.0(非商业用途)。
PyLogic-Verified-10k is a deterministically synthesized Python logic and assertion dataset containing 100% syntactically verified Python conditional logic, multi-variable state changes, and real unit test assertions. The dataset is designed for fine-tuning code large language models (LLMs) to improve their capabilities in multi-variable boundary reasoning and execution state tracking. The free preview version includes 10,000 validated execution pairs in Apache Parquet format (Snappy compressed). The full commercial version contains 100,000 samples and is available in both Parquet and JSONL formats. The dataset fields include: id (unique deterministic sample identifier), instruction (natural language code generation prompt), code (executable Python function implementation), and unit_test (real unit test suite containing assert statements). The dataset is suitable for text generation tasks, especially for code generation, program synthesis, test generation, and similar scenarios. The license is CC-BY-NC 4.0 (non-commercial).
数据集概述
PyLogic-Verified-10k 是一个确定性合成Python逻辑与断言数据集,包含10,000条经过100%语法验证的执行样本对,专为代码大语言模型的微调设计。
核心特性
- 零幻觉保证:每个函数均包含封闭式确定性单元测试断言
- 多变量边界推理:覆盖Python条件逻辑、多变量状态变更及真实单元测试断言
- 训练目标:提升代码LLM在多变量边界推理和执行状态跟踪方面的能力
资源与许可
| 版本 | 样本量 | 格式 | 许可类型 |
|---|---|---|---|
| Hugging Face免费版 | 10,000行 | Parquet(Snappy压缩) | CC-BY-NC 4.0(非商业) |
| 完整商业版 | 100,000行 | Parquet + JSONL | 完整商业许可($24购买) |
数据模式
| 字段 | 类型 | 说明 |
|---|---|---|
id |
string | 唯一的确定性样本标识符 |
instruction |
string | 自然语言代码生成提示 |
code |
string | 可执行的Python函数实现 |
unit_test |
string | 基于assert语句的真实单元测试套件 |
使用方式
通过Hugging Face的datasets库可直接加载:
python from datasets import load_dataset
dataset = load_dataset("adolessence101-ally/python-logic-assertions") print(dataset["train"][0])
补充说明
- 完整商业版包含4种不同的算法模板,免费版仅为基础关系逻辑
- 数据集标签包含:合成数据、代码、推理、Python、断言、已验证
- 全量商业语料提供Parquet和JSONL双格式下载




