arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2211.15445cs.OH
收藏

$\texttt{Davos}$:一个用于构建轻量级可复现 notebook 的 Python“走私器”

$\texttt{Davos}$: a Python "smuggler" for constructing lightweight reproducible notebooks

Paxton C. Fitzpatrick, Jeremy R. Manning

AI总结:

本文提出轻量级 Python 包 $\texttt{Davos}$,可在 Jupyter notebook 代码中声明依赖版本并自动隔离安装,从而以单文件方式分享可复现计算研究。

摘要:

可复现性是现代科学研究的一项核心要求。对于计算研究而言,可复现性意味着代码即使在不同系统上运行,也应产生相同结果。确保可复现性的一种标准方法是将项目的依赖项与其主代码库一起打包。现有解决方案在依赖项的指定深度上各有不同,涵盖从虚拟环境、容器到虚拟机等多种方式。所有这些现有解决方案都需要安装或设置一个系统来运行所需代码,从而增加了共享或参与可复现科学的复杂性与时间成本。本文提出一种更轻量的解决方案:$\texttt{Davos}$ 包。当与基于 notebook 的 Python 项目结合使用时,$\texttt{Davos}$ 提供了一种机制,可直接在需要依赖项的代码中指定项目依赖项的正确版本,并在代码运行时将其自动安装到隔离环境中。$\texttt{Davos}$ 包还进一步确保每次执行 notebook 代码时都会使用这些软件包及其特定版本。这使研究人员能够在单个 Jupyter notebook 文件中共享其代码的完整可复现副本。

英文摘要:

Reproducibility is a core requirement of modern scientific research. For computational research, reproducibility means that code should produce the same results, even when run on different systems. A standard approach to ensuring reproducibility entails packaging a project's dependencies along with its primary code base. Existing solutions vary in how deeply these dependencies are specified, ranging from virtual environments, to containers, to virtual machines. Each of these existing solutions requires installing or setting up a system for running the desired code, increasing the complexity and time cost of sharing or engaging with reproducible science. Here, we propose a lighter-weight solution: the $\texttt{Davos}$ package. When used in combination with a notebook-based Python project, $\texttt{Davos}$ provides a mechanism for specifying the correct versions of the project's dependencies directly within the code that requires them, and automatically installing them in an isolated environment when the code is run. The $\texttt{Davos}$ package further ensures that those packages and specific versions are used every time the notebook's code is executed. This enables researchers to share a complete reproducible copy of their code within a single Jupyter notebook file.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑