Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Starting a model update

Updated on September 15, 2022

Use this endpoint to start an update process to replace a model in a prediction by using Machine Learning Operations (MLOps).

Pega Customer Decision Hub

POST /predictions/{predictionID}/model_update

Method
POST
Endpoint
/predictions/{predictionID}/model_update
Sample URL
http://IP:PORT/prweb/api/application/v2/predictions/CDHSAMPLE-DATA-CUSTOMER!CUSTOMERCHURNPREDICTION/model_update

{predictionID} is an identifier of a prediction in which you want to update a model. You can view this prediction ID in Prediction Studio:

  1. In Prediction Studio, click Predictions.
  2. Open a prediction, and then click ActionsShow more info.

    The Prediction ID field contains the prediction ID that you need to add to your URL, for example, CDHSAMPLE-DATA-CUSTOMER!CUSTOMERCHURNPREDICTION.

Request

For example:
{
    "model_source": "GBM_Churn.zip",
    "validation_dataset": "churn-all.csv",
    "outcome_field_name": "Outcome",
    "model_label": "Churn GBM",
    "supporting_documents": [
        {
            "description": "Behavior report",
            "name": "BehaviorReport.pdf"
            },
            {
                "description": "Population report",
                "name": "PopulationReport.pdf"
                },
                ],
                "override_mappings": [
                    {
                        "predictor": "Credit_History",
                        "property": "pyCreditHistory"
                        }
                        ]
                        }

Model update request parameters

NameTypeDescription
model_sourceString

For file-based models, the path to the model that you want to add.

For cloud-based models, the path to the metadata file of the model that you want to add. Ensure that the model is uploaded to a folder in the repository that is configured as the Prediction Studio analytics repository. For more information, see:

validation_datasetStringThe path to the validation data set that you want to use to compare the active and candidate models before you approve or reject a model update.
perform_validationBoolean (True, False)This parameter allows you to validate the model.
outcome_field_nameStringThe name of the column that contains the outcome in the validation data set CSV file.
target_component_nameString

For supporting models, the name of the component that holds the model in a prediction strategy.

For outcome-based models, the outcome name.

model_labelStringThe name of the candidate model.
supporting_documentsArrayAn array of documentation files for the model.
override_mappingsArrayAn array of mappings of predictors in the models to the corresponding Pega Platform properties.

Supporting documents parameters

NameTypeDescription
nameStringThe path to a documentation file for the model.
descriptionStringThe description of the documentation file.

Override mappings parameters

NameTypeDescription
predictorStringA field in the candidate model that you want to select as predictor data and map to a corresponding Pega Platform property.
propertyStringA Pega Platform property that corresponds to the field in the candidate model.

Response

For example: { "referenceID": "M-9012"}

Response parameters

NameTypeDescription
referenceIDStringContains a reference ID that uniquely identifies a model update. Other endpoints use reference IDs to process requests about specific model updates, for example, to review (approve or reject) the model update or to retrieve the status of the model update.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us