arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.00429cs.SEcs.LG
收藏

模型导出格式如何影响支持机器学习的系统的开发?一项关于模型集成的案例研究

How Do Model Export Formats Impact the Development of ML-Enabled Systems? A Case Study on Model Integration

Vrije Universiteit Amsterdam(阿姆斯特丹自由大学)

Shreyas Kumar Parida, Ilias Gerostathopoulos, Justus Bogner

AI总结:

本研究通过案例研究评估五种模型导出格式对ML系统集成的影响,发现ONNX集成效率最高,SavedModel和TorchScript在Python中便捷但需变通,Pickle和Joblib最难集成,为从业者选择导出格式提供实证指导。

摘要:

机器学习(ML)模型通常被集成到支持机器学习的系统中,以提供否则无法实现的软件功能。这种集成需要选择合适的ML模型导出格式,而可供选择的格式有很多。这些格式对于确保无缝集成至关重要,选择次优的格式可能会对系统开发产生负面影响。然而,目前几乎没有证据可以指导从业者在选择导出格式时做出决策。因此,我们从集成角度评估了各种模型导出格式对支持机器学习的系统开发的影响。基于初步问卷调查(n=17)的结果,我们设计了一项广泛的嵌入式案例研究,涉及两个支持机器学习的系统,每个系统有三个使用不同技术的版本。随后,我们分析了五种流行导出格式的效果,即ONNX、Pickle、TensorFlow的SavedModel、PyTorch的TorchScript和Joblib。我们总共研究了30个分析单元(2个系统×3个技术栈×5种格式),并通过结构化现场笔记收集数据。对结果的整体定性分析表明,ONNX在大多数情况下提供了最高效的集成和可移植性。SavedModel和TorchScript在基于Python的系统中使用非常方便,但在其他情况下需要变通方法(TorchScript比SavedModel更需要)。SavedModel还允许将预处理逻辑轻松整合到单个文件中,这使其可扩展到复杂的深度学习用例。Pickle和Joblib是最难集成的,即使在基于Python的系统中也是如此。在技术支持方面,所有模型导出格式都有强大的技术文档,并且在Stack Overflow和Reddit等平台上拥有强大的社区支持。从业者可以利用我们的发现来指导选择适合其上下文的ML导出格式。

英文摘要:

Machine learning (ML) models are often integrated into ML-enabled systems to provide software functionality that would otherwise be impossible. This integration requires the selection of an appropriate ML model export format, for which many options are available. These formats are crucial for ensuring a seamless integration, and choosing a suboptimal one can negatively impact system development. However, little evidence is available to guide practitioners during the export format selection. We therefore evaluated various model export formats regarding their impact on the development of ML-enabled systems from an integration perspective. Based on the results of a preliminary questionnaire survey (n=17), we designed an extensive embedded case study with two ML-enabled systems in three versions with different technologies. We then analyzed the effect of five popular export formats, namely ONNX, Pickle, TensorFlow's SavedModel, PyTorch's TorchScript, and Joblib. In total, we studied 30 units of analysis (2 systems x 3 tech stacks x 5 formats) and collected data via structured field notes. The holistic qualitative analysis of the results indicated that ONNX offered the most efficient integration and portability across most cases. SavedModel and TorchScript were very convenient to use in Python-based systems, but otherwise required workarounds (TorchScript more than SavedModel). SavedModel also allowed the easy incorporation of preprocessing logic into a single file, which made it scalable for complex deep learning use cases. Pickle and Joblib were the most challenging to integrate, even in Python-based systems. Regarding technical support, all model export formats had strong technical documentation and strong community support across platforms such as Stack Overflow and Reddit. Practitioners can use our findings to inform the selection of ML export formats suited to their context.

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

↑