This topic describes how to automatically import Machine Learning Platform for AI
(PAI) models to Object Storage Service (OSS) for a scheduling task.
Procedure
- Log on to the PAI console and choose Model Training > Visualized Modeling (Machine Learning Studio). For more
information, see Use DataWorks tasks to schedule experiments in Machine Learning Studio.
When you create a project, we recommend that you select the pay-as-you-go billing
method and enable GPU-accelerated computing. PAI-TensorFlow tasks can run only by
using GPU resources.
- In the left-side navigation pane of the page that appears, click Models. On the page
that appears, drag the model that you want to manage to the canvas, right-click the
model, and then choose to obtain the model name.
- In the dialog box that appears, find the model name and remove the prefix pailr_coefficient from the name.
- Determine the Alibaba Cloud resource name (ARN) that is the unique credential used
by PAI to access OSS.
- Run the command to save the model.
To periodically import models to OSS, you must first create an SQL node in DataWorks
and run the following command:
pai -name modeltransfer2oss
-DmodelName=xlab_m_logisticregres_1006580_v0(Model name)
-DossPath="oss://images-beijing.oss-cn-beijing-internal.aliyuncs.com/aohai/"(OSS path)
-Darn="acs:ram::1664081855183111:role/aliyunodpspaidefaultrole"(ARN)
-Dformat=pmml
-Doverwrite=true/false;