In this paper, we present ManyTypes4Py, a large Python dataset for machine learning (ML)-based type inference. The dataset contains a total of 5,382 Python projects with more than 869K type annotations. Duplicate source code files were removed to eliminate the negative effect of the duplication bias. To facilitate training and evaluation of ML models, the dataset was split into training, validation and test sets by files. To extract type information from abstract syntax trees (ASTs), a lightweight static analyzer pipeline is developed and accompanied with the dataset. Using this pipeline, the collected Python projects were analyzed and the results of the AST analysis were stored in JSON-formatted files. The ManyTypes4Py dataset is shared on zenodo and its tools are publicly available on GitHub.
翻译:在本文中,我们展示了MyTypes4Py, 这是用于机器学习(ML)型型的推断的大型 Python 数据集。 数据集包含总共5 382 Python 项目, 超过 869K 型注解 。 复制源代码文档被移除以消除重复偏差的负面影响 。 为了方便培训和评估 ML 模型, 该数据集被分为由文件组成的培训、 验证和测试数据集 。 为了从抽象语法树中提取类型信息, 正在开发一个轻量静态分析器管道, 并伴随数据集。 使用此管道, 所收集的 Python 项目进行了分析, 并且将 AST 分析结果存储在 Json 格式化的文档中 。 许多Types4Py数据集共享于zenodo 上, 其工具在 GitHub 上公开提供 。