PyMilo: A Python Library for ML I/O
AmirHosein Rostami, Sepand Haghighi, Sadra Sabouri, Alireza Zolanvari
TL;DR
PyMilo presents a transparent, end-to-end solution for exporting and importing ML artifacts using a JSON-based, non-executable format that preserves original structure and enables safe deployment. It introduces a Chain of Responsibility Transporter network to serialize diverse data structures and an ML Streaming framework for server-client web deployment, including security via encryption. The paper demonstrates practical demonstration with a LinearRegression example and a rigorous quality-control pipeline across multiple Python versions and platforms, ensuring post-transport fidelity within strict tolerances. The work aims to improve transparency, safety, and portability in AI tooling, with plans to broaden framework support and protocol compatibility for broader adoption.
Abstract
PyMilo is an open-source Python package that addresses the limitations of existing Machine Learning (ML) model storage formats by providing a transparent, reliable, and safe method for exporting and deploying trained models. Current formats, such as pickle and other binary formats, have significant problems, such as reliability, safety, and transparency issues. In contrast, PyMilo serializes ML models in a transparent non-executable format, enabling straightforward and safe model exchange, while also facilitating the deserialization and deployment of exported models in production environments. This package aims to provide a seamless, end-to-end solution for the exportation and importation of pre-trained ML models, which simplifies the model development and deployment pipeline.
