Importing a Meta Model from a Training Job
Create a training job in ModelArts to obtain a satisfactory model. The model can then be imported to create an AI application for centralized management. The application can be quickly deployed as a service.
Constraints
- You can directly import a model generated from a training job that uses a subscribed algorithm to ModelArts, without needing to use the inference code or configuration file.
- If the meta model is from a container image, ensure the size of the meta model complies with Restrictions on the Size of an Image for Importing a Model.
Prerequisites
- The training job has been executed, and the model has been stored in the OBS directory where the training output is stored (the input parameter is train_url).
- If the training job uses a mainstream framework or custom image, upload the inference code and configuration file to the model storage directory by referring to Model Package Structure.
- The OBS directory you use must be in the same region as ModelArts.
Procedure
- Log in to the ModelArts console and choose Model Management in the navigation pane on the left.
- Click Create Model.
- Configure parameters.
- Set basic information about the model. For details about the parameters, see Table 1.
Table 1 Basic information Parameter
Description
Name
Model name. The value can contain 1 to 64 visible characters. Only letters, digits, hyphens (-), and underscores (_) are allowed.
Version
Model version. The default value is 0.0.1 for the first import.
NOTE:After a model is created, you can create new versions using different meta models for optimization.
Description
Brief description of the model.
- Set Meta Model Source to Training job. For details, see Table 2.
Figure 1 Importing a meta model from a training job
Table 2 Meta model source parameters Parameter
Description
Meta Model Source
Select Training job.
- Choose a training job from the Training Job drop-down list.
- Dynamic loading: You can enable it for quick model deployment and update. When it is enabled, model files and runtime dependencies are only pulled during an actual deployment. Enable this feature if a single model file is larger than 5 GB.
AI Engine
Inference engine used by the meta model, which is automatically matched based on the training job you select.
Inference Code
Inference code customizing the inference logic of the model. You can directly copy the inference code URL for use.
Runtime Dependency
Dependencies that the selected model has on the environment. For example, if you need to install tensorflow using pip, make sure the version is 1.8.0 or newer.
Model Description
Model descriptions to help other developers better understand and use your model. Click Add Model Description and set the document name and URL. You can add up to three model descriptions.
Deployment Type
Choose the service types for model deployment. The service types you select will be the only options available for deployment. For example, selecting Real-Time Services means the model can only be deployed as real-time services.
- Confirm the configurations and click Create now.
In the model list, you can view the created model and its version. When the status changes to Normal, the model is created. On this page, you can perform such operations as creating new versions and quickly deploying services.
- Set basic information about the model. For details about the parameters, see Table 1.
Follow-Up Operations
Deploying a service: In the model list, click Deploy in the Operation column of the target model. Locate the target version, click Deploy and choose a service type selected during model creation.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot