All Products
Search
Document Center

Platform For AI:Deploy a model as an online service

Last Updated:Dec 30, 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. You can manually deploy the model or perform one-click deployment.

Prerequisite

A model is trained and the accuracy of the model is verified. For more information about how to build and debug a model, see Model training.

Use one-click deployment

Supported model components

The following table describes the model components that support one-click deployment to EAS. Other model components support only manual deployment. For more information, see Manually deploy a model.

Component

Generated model format

EAS processor

Description

Logistic Regression for Binary Classification

PMML

PMML

Before you train a model, you need to click the model component, and select Whether to Generate PMML on the Fields Setting tab of the component. The following figure shows the configuration.

image

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.

Procedure

  1. Log on to the PAI console, and go to the Visualized Modeling (Designer) page. On the Visualized Modeling (Designer) page, select a workspace and enter the pipeline that you want to manage.

  2. In the upper part of the canvas, click Models. The system automatically detects the models that can be deployed.

  3. Select the model that you want to deploy and click Deploy in EAS to go to the Create Service page of EAS.

  4. Configure the parameters and deploy the model service.

    On the Deploy Service page, the Model File and Processor Type parameters are automatically configured. For more information about other parameters, see Deploy a model service in the PAI console.

  5. Click Deploy. When the Service Status changes to Running, the service is deployed.

Manually deploy a model

Model components described in the following table do not support one-click deployment. You need to use the Model export component to assemble the model after you train the model, and export the model to an OSS bucket, and then manually deploy the model.

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 to EAS after you export the model to an OSS bucket, see Deploy a model service in the PAI console.

FAQ

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

Click the component node, select Whether to Generate PMML on the Fields Setting tab of the component, and then rerun the node.

References

  • You can go to the Elastic Algorithm Service (EAS) page to view the statuses of the deployed model services or manage the model services. For more information, see Manage online model services in EAS.

  • You can use online debugging to test whether the service runs as expected. For more information, see Debug a service online.

  • 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.