Preparing a model for deployment

After you train a model, you can deploy it by using the OpenShift AI model serving capabilities.

To prepare it for deployment, you must copy the model from your workbench to your S3-compatible object storage.
You can use the data connection that you created in the Storage Data Connections section and upload the model from a notebook.
You also convert the model to the portable ONNX format.
ONNX allows you to transfer models between frameworks with minimal preparation and without the need for rewriting the models.

Prerequisites

  • You created the data connection My Storage.

    Workbench data connection form
  • You added the My Storage data connection to your workbench.

    Workbench edit form

Procedure

  1. In your Jupyter environment, open the 2_save_model.ipynb file.

  2. Follow the instructions in the notebook to make the model accessible in storage and save it in the portable ONNX format.

Jupyter Notebook 2

Verification

When you have completed the notebook instructions, the models/fraud/1/model.onnx file is in your object storage and it is ready for your model server to use.