MLEModernizer
收藏资源简介:
本数据集是论文《Automated Modernization of Machine Learning Engineering Notebooks for Reproducibility》的复现包所处理的核心数据。它源自Kaggle平台,通过整合Meta Kaggle和Meta Kaggle Code的元数据构建而成。数据内容主要包括来自Kaggle竞赛的Jupyter Notebook(.ipynb文件),这些Notebook是机器学习工程任务的具体实现。数据集构建过程涉及从原始Kaggle数据表中提取信息,包括KernelVersions(内核版本)、Kernels(内核实体)、Submissions(提交记录)、Users(用户)等,并通过关联这些表来定位和获取具体的Notebook代码文件。原始Notebook文件经过处理(例如,从特定HTML格式转换代码)并重新命名以增强可读性。该数据集旨在服务于机器学习工程笔记本的自动化现代化和可复现性研究。研究人员可利用此数据集评估或开发方法,以自动化方式更新、重构或标准化这些Notebook,从而提升其可维护性、可移植性和复现成功率。数据集中的Notebook关联了竞赛、用户、提交分数等丰富元数据,为分析提供了上下文。
This dataset is the core data processed by the reproduction package of the paper Automated Modernization of Machine Learning Engineering Notebooks for Reproducibility. It originates from the Kaggle platform and is constructed by integrating metadata from Meta Kaggle and Meta Kaggle Code. The data primarily consists of Jupyter Notebooks (.ipynb files) from Kaggle competitions, which are specific implementations of machine learning engineering tasks. The dataset construction process involves extracting information from original Kaggle data tables, including KernelVersions, Kernels, Submissions, Users, etc., and locating and obtaining specific Notebook code files by associating these tables. The original Notebook files are processed (e.g., converting code from specific HTML formats) and renamed to enhance readability. This dataset aims to serve research on the automated modernization and reproducibility of machine learning engineering notebooks. Researchers can use this dataset to evaluate or develop methods for automatically updating, refactoring, or standardizing these Notebooks, thereby improving their maintainability, portability, and reproducibility success rate. The Notebooks in the dataset are associated with rich metadata such as competitions, users, and submission scores, providing context for analysis.
数据集概述
该数据集是论文 "Automated Modernization of Machine Learning Engineering Notebooks for Reproducibility" 的复现包,旨在自动化现代化机器学习工程笔记本以实现可复现性。
环境与依赖
- Python 版本: 3.11.11
- 包管理: 使用
uv进行环境管理 - 依赖列表: 提供了完整的
pip list冻结环境,包含大量 Python 包,如 PyTorch (2.8.0)、TensorFlow (2.20.0)、Transformers (4.56.0)、Scikit-learn (1.5.0) 等。
术语定义
- 可复现 (Replicable): 生成了有效的 CSV 文件,且阈值 <= 10% 的脚本。即复现得分与 Kaggle 报告得分之间的差异(方差)小于 10%。
- 不可复现 (Not Replicable): 生成了有效的 CSV 文件,但阈值 > 10% 的脚本。
- 失败 (Failed): 未生成 CSV 文件的脚本(主要原因是运行时间过长或保存文件时缺少后缀
.csv),且运行时间 > 600 秒。 - 回溯 (Backporting): 回溯环境。
- 升级 (Upgrade from Baseline): 修改代码,分为文件级和代码级。
数据收集流程
原始数据来自 Meta Kaggle 和 Meta Kaggle Code 两个数据集。
数据表说明
- KernelVersions.csv: 每个已发布的内核版本的快照,包含 ID、脚本语言、运行时间、版本号、创建日期等。
- Kernels.csv: 每个内核(笔记本)实体,包含内核 ID、奖牌记录、作者用户 ID、URL 别名等。
- Submissions.csv: 每个团队的排行榜提交记录,包含团队 ID、源内核版本 ID、提交日期、公共和私有得分等。
- KernelVersionDatasetSources.csv: 内核版本与外部数据集版本的关联。
- Teams.csv: 每个比赛的团队信息。
- Competitions.csv: 每个比赛的信息,包括 ID、别名、总提交次数等。
- Users.csv: 每个 Kaggle 用户的信息。
表连接关系
- 比赛 → 团队:
Competitions.Id = Teams.CompetitionId - 团队 → 提交:
Teams.Id = Submissions.TeamId - 提交 → 内核版本:
Submissions.SourceKernelVersionId = KernelVersions.Id - 内核版本 → 内核:
KernelVersions.ScriptId = Kernels.Id - 内核 → 用户(作者):
Kernels.AuthorUserId = Users.Id - 内核版本 → 外部数据集:
KernelVersionDatasetSources.KernelVersionId = KernelVersions.Id
文件命名规则
笔记本根据 SourceKernelVersionId 进行命名和保存,格式为:
f = str(id).zfill(10) meta-kaggle-code/+f[0:4]+/+f[4:7]+/+str(id)+.ipynb
为便于阅读,重命名为 {Slug}_{UserName}_{CurrentUrlSlug}_v{VersionNumber}_{}_C1.ipynb。
基线流程(复现收集的脚本)
- 原始数据处理:
create_kernel.py: 检索所有可执行脚本的元数据(运行时间、提交日期、API、私有得分、外部数据集)。使用pigar动态列出依赖项。输出:kernel.jsonbaseline/create_fullDataset.py: 过滤目标 HTML,并将 HTML 中的代码转换为 Python 代码(.ipynb格式)。输出:baseline/notebooks/{competition}_{submissionID}_{status}.ipynb





