This guide explains how to deploy, publish, iterate, and take models offline on the risk control model hosting platform.
I. Access the model hosting page
-
Log on to the Risk Identification console.
-
In the left-side navigation pane, choose to open the Risk Control Model Hosting page.
This page includes the Model Deployment button, a search box for finding models by ID or name, and a model list. The list columns are: model ID, model name, associated features, modification time, version, version notes, publishing status, and operations.
II. Model deployment
Click Model Deployment in the upper-left corner of the page to start the model deployment process.
-
Model Configuration
In this step, fill in the model's Basic Information and Upload Model file.
-
Basic Information
-
Model Name: Uniquely identifies a model. Duplicate names are not allowed.
-
Model Type: Only the PMML file format is supported.
-
Remarks: Optional. Add notes for this version for future reference.
-
-
Upload Model
Upload Model: Upload a valid PMML model file. The system validates the model format. If the format is valid, click Save and Next to proceed to Configure Feature. If the format is invalid, you must correct the file and upload it again.
-
-
Configure Feature
In this step, Select Feature Template and click Automatic Feature Mapping to map the model's features to the platform's supported fields.
The feature configuration table includes the following required columns: model feature name, data type, and template feature mapped value, as well as an optional default value column. To manually add a feature mapping entry, click Add Item below the table.
NoteThe Automatic Feature Mapping function maps features by matching their names. For convenience, we recommend naming your fields strictly according to the feature template provided by the platform during model creation. If you use field names that are not in the template, you must map them manually:
In the field configuration list, manually select the data type and template feature mapped value for fields not in the template, such as
score_1andscore_2. These are required fields. If left empty, a red validation prompt will appear.After you complete the configuration, click Save and Next.
-
Output Parameter Processing
In this step, you configure the API output parameters. You can set the number of decimal places and apply formulas to process the model's output values.
The output parameter processing interface includes an area for setting the number of decimal places and a formula selection area for output score processing.
-
Output Parameter Processing
-
Number of Decimal Places: Set the number of decimal places for the output parameters.
-
Output score processing: By default, you can choose from four formulas: score (no processing), 1-score, score*100, and (1-score)*100. If these do not meet your needs, click Customize to the right of the drop-down list to write a formula. After validation, you can apply it. When writing the formula, use the variable name "score" to represent the original model value.
NoteThe system processes the API output based on the model type:
-
For a classification model, the original output is in the range of 0 to 1. The production API multiplies this value by 100 before returning it.
-
For a regression model, the original output is in the range of 0 to 1. The production API returns the original value without any extra processing.
-
-
-
Model Test
Upload Test File: This feature verifies the accuracy of the model's calculations. The system reads the feature values from the uploaded CSV file, processes them through the model, and returns the model calculation result and the API's actual output parameters for comparison and verification. After you complete the configuration, click Save and Next.
Test file format requirements: The CSV file must contain columns for [model input features] and [prediction_score], with a maximum of 50 data entries. After a successful upload, the system displays the test results, including the total count, number of consistent entries, and consistency ratio.
-
-
Test Environment Verification
This step indicates that your model configuration is complete. Next, you need to deploy the model to the test environment and verify that feature values can be retrieved.
NoteThe test environment is for functional verification and testing purposes only. Do not use it for production operations or to process real business data.
Click Submit for Deployment and Verification and wait for the deployment to complete in the test environment. After deployment, the verification results will be displayed, categorized as either Found or Not Found.
If the verification results or model configuration do not meet expectations, you can Return to Edit to make changes and then resubmit for deployment. If the verification is successful, click Next Step.
-
Publish
This step deploys the model to the production environment. After you Submit and Publish to complete the model deployment, the system generates API debugging information. You can use the API with the specified service and scene parameters to make requests and call the model for scoring.
Billing starts after the model is published. For billing rules, see risk control model hosting billing. The publishing status for the production environment is Not Deployed by default. Click Submit for Publication to complete the deployment.
If you have not activated the service or your account has overdue payments, you must complete the activation or renewal process as prompted on the page before you can Submit and Publish.
III. Model iteration
The model iteration feature allows you to upgrade model configurations without changing the original API configuration. After an iteration, you can reuse the original service and scene for scoring, enabling a hot update.
On the list page, select the model you want to iterate and click Iteration in the Operations column to enter the iteration configuration page.
The following table lists the configuration items that can be updated during iteration:
|
Step |
Updatable parameters |
Non-updatable parameters |
|
Model configuration |
model name, version notes |
model ID, model type, upload model |
|
Feature configuration |
Feature Mapping, Delete, Add Item |
Select Feature Template |
|
Output parameter processing |
retain decimal places, output score processing, upload test file |
|
|
Test environment verification |
Submit for Deployment and Verification |
|
|
Publish |
Submit for Publication |
Iterate and Submit for Publication, the scoring results of the production model will be based on this new iterated version. Ensure that you have thoroughly verified the changes before clicking the Submit for Publication button.
IV. Model copy
The model copy feature allows you to quickly deploy a new model based on an existing model's configuration. Once published, the new model becomes an independent instance and does not affect the original model.
-
On the risk control model hosting list page, select the model you want to copy, click Copy in the Operations column, and then click Confirm in the Copy Text dialog box to enter the configuration page for the new model.
-
After the copied version is deployed by clicking Submit and Publish, the system generates new API debugging information. You must use the new service and scene parameters to make requests and call the model for scoring.
V. Model takedown
-
On the risk control model hosting list page, select the model to take offline and click Unpublish in the Operations column.
-
In the confirmation window that appears, select the I have read and acknowledged the preceding information. checkbox, and then click Confirm to take the model offline.
NoteWhen you take a model offline, its API becomes unavailable, and the system stops time-based billing for model hosting.
VI. Model deletion
You can only delete models that are in a draft state.