Why do Machine Learning Notebooks Crash? An Empirical Study on Public Python Jupyter Notebooks
Yiran Wang, Willem Meijer, Jos\'e Antonio Hern\'andez L\'opez, Ulf Nilsson, D\'aniel Varr\'o

TL;DR
This empirical study analyzes 64,031 public Python ML notebooks to identify common crash types, root causes, and their distribution across ML pipeline stages, revealing ML-specific errors and notebook semantics issues.
Contribution
It provides a comprehensive classification of ML-specific crashes and root causes in notebooks, highlighting the impact of notebook semantics and library misuse on stability.
Findings
Over 40% of crashes are due to API misuse and notebook-specific issues.
Most crashes (over 70%) occur during data preparation, training, and evaluation stages.
TensorFlow, Keras, and Torch are the most error-prone ML libraries.
Abstract
Jupyter notebooks have become central in data science, integrating code, text and output in a flexible environment. With the rise of machine learning (ML), notebooks are increasingly used for prototyping and data analysis. However, due to their dependence on complex ML libraries and the flexible notebook semantics that allow cells to be run in any order, notebooks are susceptible to software bugs that may lead to program crashes. This paper presents a comprehensive empirical study focusing on crashes in publicly available Python ML notebooks. We collect 64,031 notebooks containing 92,542 crashes from GitHub and Kaggle, and manually analyze a sample of 746 crashes across various aspects, including crash types and root causes. Our analysis identifies unique ML-specific crash types, such as tensor shape mismatches and dataset value errors that violate API constraints. Additionally, we…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsExplainable Artificial Intelligence (XAI) · Online Learning and Analytics
