大多数公开计算笔记本是否病理性地不可执行?
Are the Majority of Public Computational Notebooks Pathologically Non-Executable?
AI总结:
本文重新审视公开计算笔记本的可执行性,通过区分可恢复与病理性不可执行笔记本并使用LLM修复配置、模块和数据问题,发现真正病理性不可执行比例仅为21.3%。
摘要:
计算笔记本是探索性数据科学的事实平台,提供了一个交互式编程环境,用户可以在其中按任意顺序创建、修改和执行代码单元。然而,这种灵活性往往会带来代码质量问题;先前研究表明,约76%的公开笔记本不可执行,这引发了人们对其可复用性的严重担忧。我们认为,传统的可执行性概念——要求笔记本完整且无错误地运行——过于僵化,会错误分类许多笔记本,并高估其不可执行性。本文研究了在不同可执行性概念和程度下,公开笔记本中的病理性可执行性问题。即使只是部分改善可执行性,也能提升代码理解,并为动态分析提供途径。基于这一洞见,我们首先将笔记本分为可能可恢复的笔记本和病理性不可执行笔记本,随后衡量消除笔记本中的配置错误和表层执行问题能够在多大程度上改善其可执行性(即额外有多少单元可无错误执行)。在一个包含42,546个热门公开笔记本、其中有34,659个不可执行笔记本的数据集中,仅有21.3%是真正病理性不可执行的。对于可恢复笔记本,基于LLM的方法完全恢复了5.4%此前不可执行的笔记本。在部分恢复的笔记本中,通过安装正确模块和生成合成数据,笔记本的可执行性分别提升了42.7%和28%。这些发现挑战了先前的假设,表明笔记本的可执行性高于此前报告的水平,其中许多笔记本提供了有价值的部分执行能力,并且应当在交互式笔记本范式内评估其可执行性,而不是采用传统软件的可执行性标准。
英文摘要:
Computational notebooks are the de facto platforms for exploratory data science, offering an interactive programming environment where users can create, modify, and execute code cells in any sequence. However, this flexibility often introduces code quality issues, with prior studies showing that approximately 76% of public notebooks are non-executable, raising significant concerns about reusability. We argue that the traditional notion of executability - requiring a notebook to run fully and without error - is overly rigid, misclassifying many notebooks and overestimating their non-executability. This paper investigates pathological executability issues in public notebooks under varying notions and degrees of executability. Even partially improving executability can improve code comprehension and offer a pathway for dynamic analyses. With this insight, we first categorize notebooks into potentially restorable and pathological non-executable notebooks and then measure how removing misconfiguration and superficial execution issues in notebooks can improve their executability (i.e., additional cells executed without error). In a dataset of 42,546 popular public notebooks containing 34,659 non-executable notebooks, only 21.3% are truly pathologically non-executable. For restorable notebooks, LLM-based methods fully restore 5.4% of previously non-executable notebooks. Among the partially restored, the executability of notebooks improves by 42.7% and 28% by installing the correct modules and generating synthetic data. These findings challenge prior assumptions, suggesting that notebooks have higher executability than previously reported, many of which offer valuable partial execution, and that their executability should be evaluated within the interactive notebook paradigm rather than through traditional software executability standards.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。