部署#

当部署到生产环境时,通常希望包含尽可能少的依赖项。针对这种情况,我们提供了interpret-core包,它仅包含EBM拟合、预测、编辑、序列化和生成解释所需的依赖项。

interpret 包包含了 interpret-core 的所有依赖项,以及用于可视化EBMs、生成其他玻璃盒模型和黑盒解释所需的额外依赖项。

为了进一步定制,我们支持在pip安装时使用额外的标签来微调依赖项。

安装所有依赖项(默认)

interpret 安装了运行该包任何部分所需的所有依赖项。

pip install interpret

conda install -c conda-forge interpret

克隆 interpretml/interpret.git 并进入 interpret/scripts 目录,然后执行 make install

使用最少的依赖项安装

当你只需要必需的依赖项,或者你希望自定义依赖项时,请安装包 interpret-core

pip install interpret-core

conda install -c conda-forge interpret-core

克隆 interpretml/interpret.git 并进入 interpret/scripts 目录,然后执行 make install-core

使用一些官方依赖项安装 (pip)

这种情况在我们支持的所有包管理器中并未涵盖。如果您使用pip进行安装,您可以利用为interpret-core提供的额外标签。

安装所有额外标签等同于安装interpret包,可以通过以下方式完成:

pip install interpret-core[debug,notebook,plotly,lime,sensitivity,shap,linear,skoperules,treeinterpreter,aplr,dash,testing]
  • interpret 使用 interpret-core 标签,可以在这里找到。

  • interpret-core 找到的额外标签 here.