一句话:SnifferDog 通过收集 Python 包 API 数据库并分析 notebook 推断所需依赖包及版本,恢复其可执行环境。
超过 90% 已发表的 Jupyter notebook 没有声明对外部包的依赖,这导致 notebook 无法执行,也阻碍了科学结果的可复现性。本文提出 SnifferDog:首先收集 Python 包及其版本的 API 信息,构建 API 数据库;其次分析 notebook 中使用的 API,推断所需的候选包与版本;最后检查哪些包组合能使 notebook 真正可执行,并尽可能复现其中记录的结果。评估表明,SnifferDog 能为绝大多数 notebook 精确恢复执行环境,使其对终端用户立即可执行。
More than ninety percent of published Jupyternotebooks do not state dependencies on external packages. This makes them non-executable and thus hinders reproducibility of scientific results. We present SnifferDog, an approach that1) collects the APIs of Python packages and versions, creating a database of APIs; 2) analyzes notebooks to determine candidates for required packages and versions; and 3) checks which packages are required to make the notebook executable(and ideally, reproduce its stored results). In its evaluation, we show thatSnifferDogprecisely restores execution environments for the largest majority of notebooks, making them immediately executable for end users.