OfflineModel is a data format used in MaxCompute. Models that are generated by traditional machine learning algorithms based on the PAICommand framework are stored in OfflineModel format in MaxCompute projects. You can use OfflineModel components to obtain offline models and use the offline models to run offline prediction tasks. This topic describes the OfflineModel components.

Copy MaxCompute Offline Model

In most machine learning scenarios, you can use a workflow in a development environment to develop a model. Then, use a workflow in a production environment to periodically call the model to run prediction tasks. To do this, you need to use the Copy MaxCompute Offline Model component to persist the model to an environment in which the prediction tasks can directly access the model.

You can connect the Copy MaxCompute Offline Model component to the model creation workflow as a downstream node. You can also specify a name for the model that is generated by the component. The following figure shows the component. WorkflowYou can configure the following parameters in the Parameters Setting panel. Copy MaxCompute Offline ModelParameter description:
  • Dest MaxCompute Project: If you do not specify this parameter, the MaxCompute project in the current workspace is used.
  • Whether to override the model with the same name as the dest model: If you select this option, the component automatically deletes the original model and then creates a new model.

Read MaxCompute Offline Model

In most machine learning scenarios, you can use a workflow in a development environment to develop a model. Then, use a workflow in a production environment to periodically call the model to run prediction tasks. To do this, you need to use the Read MaxCompute Offline Model component. You need to only specify the Model Name parameter in the Fields Setting panel of the component. Read MaxCompute Offline Model

Model export

You can use the Model export component to export an offline model to a specified Object Storage Service (OSS) path. You can configure the following parameters in the Parameters Setting panel. Model exportParameter description:
  • Overwrite: If you select this option, the generated model files override the model files with the same names in the specified OSS path.
  • Export Model Type: You can select original to export the model files in MaxCompute OfflineModel format or select pmml to export the model files in Predictive Model Markup Language (PMML) format.