Kishu:计算笔记本的时间旅行
Kishu: Time-Traveling for Computational Notebooks
AI总结:
针对计算笔记本无法回溯会话状态的问题,提出Kishu系统,采用增量检查点与检出机制,实现亚秒级时间旅行,兼容146个对象类,检查点大小和检出时间分别最高减少4.55倍和9.02倍。
摘要:
计算笔记本(例如 Jupyter、Google Colab)被数据科学家广泛使用。笔记本的一个关键特性是交互式计算模型,即迭代执行单元格(即一组语句)并观察结果(例如模型或绘图)。不幸的是,现有的笔记本系统不提供回到过去状态的时间旅行:当用户执行一个单元格时,由用户定义变量组成的笔记本会话状态可能被不可逆地修改——例如,用户无法“取消删除”数据框列。这是因为与数据库管理系统(DBMS)不同,现有的笔记本系统不跟踪会话状态。现有的检查点和恢复会话状态的技术,如操作系统级内存快照或应用程序级会话转储,是不够的:检查点可能产生高昂的存储成本且可能失败,而恢复只能通过完全加载检查点文件从头开始低效地执行。在本文中,我们介绍了一个新的笔记本系统Kishu,它使用高效且容错的增量检查点和检出机制,提供到任意笔记本状态及从任意笔记本状态进行时间旅行的能力。Kishu创建增量检查点,这些检查点体积小,并在一种新颖的共变量粒度下正确保留复杂的变量间依赖关系。然后,为了返回到先前的状态,Kishu准确识别当前状态与目标状态之间的差异,以亚秒级延迟执行增量检出,并最小化数据加载。Kishu兼容来自流行数据科学库(例如Ray、Spark、PyTorch)的146个对象类,并在各种笔记本上将检查点大小和检出时间分别减少了最多4.55倍和9.02倍。
英文摘要:
Computational notebooks (e.g., Jupyter, Google Colab) are widely used by data scientists. A key feature of notebooks is the interactive computing model of iteratively executing cells (i.e., a set of statements) and observing the result (e.g., model or plot). Unfortunately, existing notebook systems do not offer time-traveling to past states: when the user executes a cell, the notebook session state consisting of user-defined variables can be irreversibly modified - e.g., the user cannot 'un-drop' a dataframe column. This is because, unlike DBMS, existing notebook systems do not keep track of the session state. Existing techniques for checkpointing and restoring session states, such as OS-level memory snapshot or application-level session dump, are insufficient: checkpointing can incur prohibitive storage costs and may fail, while restoration can only be inefficiently performed from scratch by fully loading checkpoint files. In this paper, we introduce a new notebook system, Kishu, that offers time-traveling to and from arbitrary notebook states using an efficient and fault-tolerant incremental checkpoint and checkout mechanism. Kishu creates incremental checkpoints that are small and correctly preserve complex inter-variable dependencies at a novel Co-variable granularity. Then, to return to a previous state, Kishu accurately identifies the state difference between the current and target states to perform incremental checkout at sub-second latency with minimal data loading. Kishu is compatible with 146 object classes from popular data science libraries (e.g., Ray, Spark, PyTorch), and reduces checkpoint size and checkout time by up to 4.55x and 9.02x, respectively, on a variety of notebooks.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。