Model management

Updated at:

The model management feature in Data Management Service (DMS) lets you create custom model groups. Each model group corresponds to a specific business scenario. DMS supports training models in task orchestration nodes and registering them with a model group. In model management, you can create model groups, deploy models, and delete models or model groups.

Notes

The model management feature is in invitation-only preview.

Create a model group

  1. Log in to DMS 5.0.

  2. In the upper-left corner of the console, click the 2023-01-28_15-57-17.png icon and choose All Functions > Data Assets > Model Management.

    Note

    If you are using the console in a mode other than simple mode, choose Data Assets > Model Management from the top navigation bar.

  3. In the upper-left corner of the page, click Create Model Group.

  4. Specify the Model Group Name and Description, and then click OK.

Register a model

In DMS task orchestration, you can use the model training, model evaluation, and model inference nodes to register generated models with a model group.

  1. Move the pointer over the 2023-01-28_15-57-17.png icon in the upper-left corner and choose All Features > Data+AI > Data Development > Task Orchestration.

    Note

    If you use the DMS console in normal mode, choose Data+AI > Data Development > Task Orchestration in the top navigation bar.

  2. Create a model group. For instructions, see Create a model group.

  3. Model training

    Create and train a model. After successful training, DMS automatically registers the model with the model group. For instructions on creating and configuring a model training node, see Step 2: Create and configure a model training node.

    1. Run the configured model training node. A successful run generates a model.

      [GMT+08:00] INFO - check model status, Query key:ModelTrainJob-xxx
      [GMT+08:00] INFO - Query success! result List:
                         Msg  createTime  updateTime
                         xxx
      [GMT+08:00] INFO - model status:saved_oss
      [GMT+08:00] INFO - update run, response:{"accessDeniedDetail":null,"HttpStatusCode":200,"RequestId":"ebf61cb3-5b07-4204-8e6d-b330e60de5ed","Data":{"run_info":
                    xxx, status : FINISHED }}, Success :true, Code : Success , Message :xxx
      [GMT+08:00] INFO - run xxx update to Status:FINISHED
      [GMT+08:00] INFO - model train success, model path:
      [GMT+08:00] INFO - start register model
      [GMT+08:00] INFO - register model, response: {"accessDeniedDetail":null,"HttpStatusCode":200,"RequestId":"8b4829b6-ac74-4964-9e40-bc8bccd4458a","Data":{"model_version":{"name":
                    xxx,"model version name":"bst_new_20240902_withPolarEndpoint","creation_timestamp":17xxx, ...}}}
    2. DMS automatically registers the model with the model group.

      In the model information section, you can view the source workflow of the model.

  4. Model evaluation

    The system evaluates the model's metrics and registers them to the model. You can use these metrics to assess if the model is ready for inference. For instructions on creating and configuring a model evaluation node, see Step 3: (Optional) Create and configure a model evaluation node.

    Evaluation metrics include Fscore_precision (precision), Fscore_recall (recall), and Fscore_f1score (F1 score). Each metric is displayed separately for class 0 and class 1. In the model list, you can view the metric data for each model and perform operations such as Deploy, Undeploy, Delete, or Edit.

  5. Model deployment

    After model evaluation, you can deploy the model if you are satisfied with its metrics. For deployment instructions, see Step 4: Deploy the model.

    In the Actions column for the target model, click Deploy. In the Deploy Model dialog box that appears, select an AnalyticDB instance and AI resources, and then click Deploy.

  6. Model inference

    Use the deployed model to make predictions or classifications on new data. For instructions on creating and configuring a model inference node, see Step 5: Create and configure a model inference node.

    1. In a model inference node, configure the deployed model and then run the node.

    2. On the Model Management page, check the status of the target model. If the status is in use, the model is active.

View or edit model groups

  • View model group information

    On the Model Management page, you can view details for the registered models, including Model ID, Model Name, Model Status, Training Engine (the engine used for training, such as AnalyticDB for MySQL or PolarDB for MySQL), and Source Workflow.

  • Edit model group information

    Click Edit next to the model group to change the Model Group Name and Description.

Undeploy a model or delete a model group

  • Undeploy a model

    Click Undeploy next to the target model and click OK in the confirmation dialog box.

    Note

    Models trained by the PolarDB for MySQL engine cannot currently be deployed or undeployed.

  • Delete a model group

    Click Delete next to the model group and click OK in the confirmation dialog box.