Assessing and Restoring Reproducibility of Jupyter Notebooks
Jiawei Wang, Tzu-yang Kuo, Li Li, Andreas Zeller
摘要
Jupyter notebooks-documents that contain live code, equations, visualizations, and narrative text-now are among the most popular means to compute, present, discuss and disseminate scientific findings. In principle, Jupyter notebooks should easily allow to reproduce and extend scientific computations and their findings; but in practice, this is not the case. The individual code cells in Jupyter notebooks can be executed in any order, with identifier usages preceding their definitions and results preceding their computations. In a sample of 936 published notebooks that would be executable in principle, we found that 73% of them would not be reproducible with straightforward approaches, requiring humans to infer (and often guess) the order in which the authors created the cells. In this paper, we present an approach to (1) automatically satisfy dependencies between code cells to reconstruct possible execution orders of the cells; and (2) instrument code cells to mitigate the impact of non-reproducible statements (i.e., random functions) in Jupyter notebooks. Our Osiris prototype takes a notebook as input and outputs the possible execution schemes that reproduce the exact notebook results. In our sample, Osiris was able to reconstruct such schemes for 82.23% of all executable notebooks, which has more than three times better than the state-of-the-art; the resulting reordered code is valid program code and thus available for further testing and analysis.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 14 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Improving Steering and Verification in AI-Assisted Data Analysis with Interactive Task Decomposition 引用了 How Do Analysts Understand and Verify AI-Assisted Data Analyses?
- Subtle Bugs Everywhere: Generating Documentation for Data Wrangling Code 引用了 Restoring Execution Environments of Jupyter Notebooks
- Restoring Execution Environments of Jupyter Notebooks 引用了 Exploring how deprecated Python library APIs are (not) handled
引用它的顶会 Paper14
- Exploring how deprecated Python library APIs are (not) handledJiawei Wang, Li Li, Kui Liu, Haipeng CaiFSE 2020 · 52 次引用
- Improving Steering and Verification in AI-Assisted Data Analysis with Interactive Task DecompositionMajeed Kazemitabaar, Jack Williams, Ian Drosos, Tovi Grossman 等UIST 2024 · 49 次引用
- Restoring Execution Environments of Jupyter NotebooksJiawei Wang, Li Li, Andreas ZellerICSE 2021 · 49 次引用
- How Do Analysts Understand and Verify AI-Assisted Data Analyses?Ken Gu, Ruoxi Shang, Tim Althoff, Chenglong Wang 等CHI 2024 · 36 次引用
- Subtle Bugs Everywhere: Generating Documentation for Data Wrangling CodeChenyang Yang, Shurui Zhou, Jin L. C. Guo, Christian KästnerASE 2021 · 25 次引用
相关 Paper
- Fine-Grained Lineage for Safer Notebook InteractionsStephen Macke, Aditya G. Parameswaran, Hongpu Gong, Doris Jung Lin Lee 等VLDB 2021 · 46 次引用
- Bolt-on, Compact, and Rapid Program Slicing for Notebooks [Scalable Data Science]Shreya Shankar, Stephen Macke, Sarah E. Chasins, Andrew Head 等VLDB 2022 · 17 次引用
- NB2P: Generating Data Science Pipelines from Computational NotebooksHaotian Gao, Quang Trung Ta, Tien Tuan Anh Dinh, Nhut-Minh Ho 等ICSE 2026
- ElasticNotebook: Enabling Live Migration for Computational NotebooksZhaoheng Li, Pranav Gor, Rahul Prabhu, Hui Yu 等VLDB 2024 · 12 次引用
- Automated Modernization of Machine Learning Engineering Notebooks for ReproducibilityBihui Jin, Kaiyuan Wang, Pengyu NieISSTA 2026
