All Products
Search
Document Center

Platform For AI:Deploy a model as an online service

Last Updated:Feb 22, 2024

Machine Learning Designer is seamlessly integrated with Elastic Algorithm Service (EAS). After you train and evaluate a model offline in Machine Learning Designer, you can deploy the model to EAS as an online service. This topic describes how to deploy a model that is trained in Machine Learning Designer to EAS as an online service.

Prerequisites

A model is trained and the accuracy of the model is verified. For more information, see Model training.

Use one-click deployment

Algorithms that support one-click deployment

Component

Generated model format

EAS processor

Description

Logistic Regression for Binary Classification

PMML

PMML

Before you train a model, you need to select Whether to Generate PMML on the Fields Setting tab of the component.

GBDT Binary Classification

PMML

PMML

Linear SVM

PMML

PMML

Logistic Regression for Multiclass Classification

PMML

PMML

Random Forest

PMML

PMML

Naive Bayes

PMML

PMML

K-means Clustering

PMML

PMML

GBDT Regression

PMML

PMML

Linear Regression

PMML

PMML

Scorecard Training

PMML

PMML

Text Summarization

TGZ package

EasyNLP

EasyNLP provided by Platform for AI (PAI) in a public Object Storage Service (OSS) bucket is automatically specified.

image classification (torch)

TGZ package

EasyCV

EasyCV provided by PAI in a public OSS bucket is automatically specified.

PyAlink Script

AlinkModel

Alink

For more information, see PyAlink Script.

XGboost Train

XGBoost

XGBoost

For more information, see XGboost Train.

For components that are used to train a PMML model, you need to perform the steps in the following figure to select Whether to Generate PMML on the Fields Setting tab of the component and rerun the corresponding node.image

Procedure

  1. Go to the Machine Learning Designer page.

    1. Log on to the PAI console.

    2. In the left-side navigation pane, click Workspaces. On the Workspaces page, click the name of the workspace that you want to manage.

    3. In the left-side navigation pane, choose Model Training > Visualized Modeling (Designer) to go to the Machine Learning Designer page.

  2. On the Pipelines tab, double-click the pipeline that you want to manage.

  3. In the upper-left corner of the canvas, click Models.

    The system automatically detects the trained model on the canvas, matches the model with a processor, and then redirects you to the EAS-Online Model Services page to complete the deployment. For more information, see Deploy a model service by using Machine Learning Designer.

Manually deploy a model

After you use the algorithm components in the following table to train a model, you need to use the Model Export component to assemble the model, and export the model to an OSS bucket, and then manually deploy the model. This method does not support one-click deployment.

Component

Generated model format

EAS processor

Manual deployment process

PS-SMART Binary Classification Training

PS

PS algorithm

Connect the output port of the component to the Model Export component.

PS-SMART Multiclass Classification

PS-SMART Regression

For more information about how to manually deploy a model after you export the model to an OSS bucket, see Model service deployment by using the PAI console.

FAQ

What do I do if some nodes are dimmed and cannot be selected when I deploy a model in one-click mode?image.png

Open the Fields Setting tab of the component on the right side, select Whether to Generate PMML, and then rerun the corresponding node. For more information, see Algorithms that support one-click deployment.

References

  • You can go to the EAS-Online Model Services page to view the status of the deployed services or manage services. For more information, see Manage online model services in EAS.

  • After you deploy a model service, you can use the Update EAS Service (Beta) component provided by Machine Learning Designer to update the service on a regular basis. For more information, see Periodically update online model services.

  • Machine Learning Designer allows you to deploy a batch data processing pipeline to EAS as an online service after you package the pipeline as a model. For more information, see Deploy a pipeline as an online service.

  • You can use the prediction component provided by Machine Learning Designer to perform batch offline prediction for a model. For more information, see Implement batch prediction.