论文标题
更安全的笔记本互动的细粒血统
Fine-Grained Lineage for Safer Notebook Interactions
论文作者
论文摘要
计算笔记本已成为数据科学和分析工作流的首选平台,从而可以快速迭代和探索。通过将中间程序状态保持在内存中,并将执行单位分割为所谓的“单元格”,笔记本电脑使用户可以交互作用地执行工作流程,并享受特别紧张的反馈。但是,随着单元格的添加,删除,重新排序和重新运行,这种隐藏的中间状态会以一种不一定与笔记本电脑的可见代码相关的方式积累,使执行行为难以推理,并导致错误和缺乏可重复性。我们提出了NBSAfety,这是一种自定义的jupyter内核,它使用运行时跟踪和静态分析来自动管理与单元执行和全局笔记本电脑状态相关的谱系。 NBSAFETY检测并防止用户在单独的笔记本交互期间遇到的错误,同时保留了现有笔记本语义的灵活性。我们通过重播和分析666个真实笔记本会话来评估NBSAfety预防错误相互作用的能力。其中,NBSAfety确定了117次会话,并具有潜在的安全错误,在其余的549次会议中,即使用户没有使用NBSAFETY并没有受到建议,即使用户不使用NBSAFETY $ 7 \ times $ $ 7 \ times $ $ 7 \ times $。
Computational notebooks have emerged as the platform of choice for data science and analytical workflows, enabling rapid iteration and exploration. By keeping intermediate program state in memory and segmenting units of execution into so-called "cells", notebooks allow users to execute their workflows interactively and enjoy particularly tight feedback. However, as cells are added, removed, reordered, and rerun, this hidden intermediate state accumulates in a way that is not necessarily correlated with the notebook's visible code, making execution behavior difficult to reason about, and leading to errors and lack of reproducibility. We present NBSafety, a custom Jupyter kernel that uses runtime tracing and static analysis to automatically manage lineage associated with cell execution and global notebook state. NBSafety detects and prevents errors that users make during unaided notebook interactions, all while preserving the flexibility of existing notebook semantics. We evaluate NBSafety's ability to prevent erroneous interactions by replaying and analyzing 666 real notebook sessions. Of these, NBSafety identified 117 sessions with potential safety errors, and in the remaining 549 sessions, the cells that NBSafety identified as resolving safety issues were more than $7\times$ more likely to be selected by users for re-execution compared to a random baseline, even though the users were not using NBSafety and were therefore not influenced by its suggestions.