You can use the Model export component to export a model that is trained in MaxCompute to a specific Object Storage Service (OSS) path. This topic describes how to use the Model export component.
Prerequisites
Platform for AI (PAI) is authorized to access OSS. For more information, see Grant the permissions that are required to use Machine Learning Designer.
Supported upstream components
General machine learning components
Parameter Server (PS) components
Configure the component in the PAI console
You can configure the following parameters on the Parameters Setting tab of the Model export component.
Parameter | Description |
Rename |
Note If you want to override the previously exported model each time you export a new model, you must configure the Rename parameter and select the Overwrite option. |
Overwrite | If you select this option, the generated model files override the model files that have the same names in the specified OSS path. |
Export Model Type | Valid values:
Types of exported models supported by upstream components:
|
Configure the component by using PAI commands
You can run the following PAI commands by using the SQL Script component or the ODPS SQL nodes of DataWorks to configure the component:
PAI -name generalmodeltransfer2oss
-project algo_public
-Dformat="original"
-Drename="model_export"
-Doverwrite="false"
-DossPath="oss://examplebucket-cn-hangzhou-internal.aliyuncs.com/export/"
-Darn="acs:ram::xxxxxxxxxx:role/aliyunodpspaidefaultrole"
-DmodelName="model_flow_aius5tamq5rv4x****_node_anprs9ufo40opc****_model"
The following table describes the parameters used in the preceding syntax.
Parameter | Required | Description | Default value |
format | Yes | The format of the model that you want to export. Valid values:
| None |
rename | No | The new name of the model. | None, which indicates that the name is not changed. |
overwrite | No | Specifies whether to overwrite the model that has the same name in the specified path. Valid values:
| false |
ossPath | Yes | The OSS path of the model that you want to export. | None |
arn | Yes | The authorization information. To obtain the authorization information, log on to the PAI console and go to the Dependent Services page. In the Designer section, find OSS and click View Authorization in the Actions column. For more information, see Grant the permissions that are required to use Machine Learning Designer. | None |
inputTable | No | If you want to export models obtained from PS-related components, you must configure the output model table for these components. | None |
modelName | Yes | The name of the model that you want to export. | None |