Analysing Python Machine Learning Notebooks with Moose

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Mignard, Marius, Costiou, Steven, Anquetil, Nicolas, Etien, Anne
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912587568906240
author Mignard, Marius
Costiou, Steven
Anquetil, Nicolas
Etien, Anne
author_facet Mignard, Marius
Costiou, Steven
Anquetil, Nicolas
Etien, Anne
contents Machine Learning (ML) code, particularly within notebooks, often exhibits lower quality compared to traditional software. Bad practices arise at three distinct levels: general Python coding conventions, the organizational structure of the notebook itself, and ML-specific aspects such as reproducibility and correct API usage. However, existing analysis tools typically focus on only one of these levels and struggle to capture ML-specific semantics, limiting their ability to detect issues. This paper introduces Vespucci Linter, a static analysis tool with multi-level capabilities, built on Moose and designed to address this challenge. Leveraging a metamodeling approach that unifies the notebook's structural elements with Python code entities, our linter enables a more contextualized analysis to identify issues across all three levels. We implemented 22 linting rules derived from the literature and applied our tool to a corpus of 5,000 notebooks from the Kaggle platform. The results reveal violations at all levels, validating the relevance of our multi-level approach and demonstrating Vespucci Linter's potential to improve the quality and reliability of ML development in notebook environments.
format Preprint
id arxiv_https___arxiv_org_abs_2509_11748
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Analysing Python Machine Learning Notebooks with Moose
Mignard, Marius
Costiou, Steven
Anquetil, Nicolas
Etien, Anne
Software Engineering
Machine Learning
Machine Learning (ML) code, particularly within notebooks, often exhibits lower quality compared to traditional software. Bad practices arise at three distinct levels: general Python coding conventions, the organizational structure of the notebook itself, and ML-specific aspects such as reproducibility and correct API usage. However, existing analysis tools typically focus on only one of these levels and struggle to capture ML-specific semantics, limiting their ability to detect issues. This paper introduces Vespucci Linter, a static analysis tool with multi-level capabilities, built on Moose and designed to address this challenge. Leveraging a metamodeling approach that unifies the notebook's structural elements with Python code entities, our linter enables a more contextualized analysis to identify issues across all three levels. We implemented 22 linting rules derived from the literature and applied our tool to a corpus of 5,000 notebooks from the Kaggle platform. The results reveal violations at all levels, validating the relevance of our multi-level approach and demonstrating Vespucci Linter's potential to improve the quality and reliability of ML development in notebook environments.
title Analysing Python Machine Learning Notebooks with Moose
topic Software Engineering
Machine Learning
url https://arxiv.org/abs/2509.11748