Keras Model Conversion with Wallaroo

Wallaroo.AI
2 min readNov 2, 2022

--

Keras models are a construct of network architecture and model weights that offer consistency and simple APIs for integration, minimizing the volume of user actions needed for common cases. However, despite its commercial adoption by large corporate companies, not all ML deployment platforms provide a method of adoption for an enterprise’s ML model of choice. Wallaroo’s flexible platform is particularly useful for solving this issue, as it allows the continued use of a company’s preferred ML models and adapts to your existing digital ecosystem. This adaptability is a powerful added value to any MLOps, allowing teams to keep their current models instead of starting over to fit into a deployment platform. Wallaroo’s model conversion process can transform a Keras model into an open format that will run on the Wallaroo framework at speed.

The benefits of model conversion go beyond mere compatibility, allowing enterprises to integrate all the advanced Wallaroo platform features into their MLOps for faster deployment, real-time predictions, experimentation, scalability, and analysis of larger data sets. In addition to utilizing these features, it allows companies to save on resources by keeping their model files in their current format so that any future changes can be made with ease. Wallaroo’s conversion processes allow for enhanced compatibility across machine learning frameworks, standardizing ML model management for your enterprise.

This guide will follow the steps for converting your Keras (or Tensor) model into ONNX, enabling Keras or Tensor ML models to deploy with Wallaroo.

Note: The following information has been validated only as of 11/2/2022. If you have any issues executing these procedures with similar results, please visit our documentation site for our most recent code and suggestions.

Prerequisites for Executing Wallaroo’s Model Conversion

To follow the instructions in this guide successfully, you will need a Wallaroo instance and must run this Notebook from the Wallaroo Jupyter Hub service. Additionally, you will need the following parameters to run the Wallaroo auto-converter convert_model(path, source_type, and conversion_arguments) method for keras conversions:

  • path (STRING): The path to the ML model file.
  • source_type (ModelConversionSource): ML model type to be converted.
  • conversion_arguments: The arguments for the conversion depending on the model type to be converted.

Keras Model Conversion

Step 1: Import Libraries…

The full version of this blog and others are available on our website at wallaroo.ai/blog

--

--

Wallaroo.AI
Wallaroo.AI

Written by Wallaroo.AI

90% of AI projects fail to deliver ROI. We change that. Wallaroo solves operational challenges for production ML so you stay focused on business outcomes.

No responses yet