The PAICommand framework stores models trained with traditional machine learning algorithms as OfflineModels in their respective MaxCompute projects. You can use OfflineModel components to retrieve these models for offline prediction tasks, including copying, reading, and exporting models.
Copy MaxCompute offline model
In a typical workflow, you build a model in a development environment and then read it in a production environment for periodic prediction tasks. Use the Copy MaxCompute Offline Model component to persist the model to a location accessible by the prediction workflow.
On the component's Parameters Setting tab, configure the following parameters: Target Model Name (Required), Dest MaxCompute Project, and Overwrite.
-
Dest MaxCompute Project: If you do not specify this parameter, the MaxCompute project of the current workspace is used by default.
-
Overwrite: If you select this option, the component first deletes the existing model and then creates the new one.
Read MaxCompute offline model
To perform periodic prediction tasks, use the Read MaxCompute Offline Model component to directly read a model. You only need to configure the Model Name on the Fields Setting tab. The MaxCompute Project Name defaults to the MaxCompute project of the current workspace.
Model export
The Model export component exports an OfflineModel to a specified OSS path. Configure the following parameters on the Parameter Settings tab.
Parameters include OSS Target Path (required), Rename (optional), and OSS RAM Role Settings (requires authorization).
-
Overwrite: If selected, the component overwrites any existing file of the same name at the specified OSS path.
-
Export Model Type: Choose to export the model in its original MaxCompute OfflineModel format or as a Predictive Model Markup Language (pmml) file.