Deployment Model Replacement
This page outlines the operations, endpoints, parameters, and example requests and responses for the Deployment Model Replacement.
PATCH /api/v2/deployments/{deploymentId}/model/
Replace the model used to make predictions for the deployment.
A validation process will be performed to make sure the new model is eligible as a replacement. If the validation fails, the model replacement will not occur.The Model Replacement Validation endpoint can be used to confirm the new model is eligible as a replacement.
Code samples
curl -X PATCH https://app.datarobot.com/api/v2/deployments/{deploymentId}/model/ \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {access-token}" \
-d '{undefined}'
Body parameter
{
"modelId": "string",
"modelPackageId": "string",
"reason": "ACCURACY",
"runtimeParameterValues": "string"
}
Parameters
| Name |
In |
Type |
Required |
Description |
| deploymentId |
path |
string |
true |
Unique identifier of the deployment. |
| body |
body |
ModelReplacementSubmission |
false |
none |
Example responses
202 Response
{
"checks": {
"combinedModelSegments": {
"message": "string",
"status": "failing"
},
"containsTrackedSegmentAttributes": {
"message": "string",
"status": "failing"
},
"driftTracking": {
"message": "string",
"status": "failing"
},
"featureDataTypes": {
"message": "string",
"status": "failing"
},
"features": {
"message": "string",
"status": "failing"
},
"humilityRules": {
"message": "string",
"status": "failing"
},
"modelCanBeDeployed": {
"message": "string",
"status": "failing"
},
"modelStatus": {
"message": "string",
"status": "failing"
},
"notCurrentModel": {
"message": "string",
"status": "failing"
},
"permission": {
"message": "string",
"status": "failing"
},
"predictionIntervals": {
"message": "string",
"status": "failing"
},
"predictionReady": {
"message": "string",
"status": "failing"
},
"seriesType": {
"message": "string",
"status": "failing"
},
"supported": {
"message": "string",
"status": "failing"
},
"target": {
"message": "string",
"status": "failing"
},
"targetClasses": {
"message": "string",
"status": "failing"
},
"targetType": {
"message": "string",
"status": "failing"
},
"timeSeriesCompatibility": {
"message": "string",
"status": "failing"
},
"validChallenger": {
"message": "string",
"status": "failing"
}
},
"message": "string",
"status": "failing"
}
Responses
| Status |
Header |
Type |
Format |
Description |
| 202 |
Location |
string |
|
A url that can be polled to check the status. |
To perform this operation, you must be authenticated by means of one of the following methods:
BearerAuth
POST /api/v2/deployments/{deploymentId}/model/validation/
Validate that a model can be used to replace the current model of the deployment.
Code samples
curl -X POST https://app.datarobot.com/api/v2/deployments/{deploymentId}/model/validation/ \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {access-token}" \
-d '{undefined}'
Body parameter
{
"modelId": "string",
"modelPackageId": "string"
}
Parameters
Example responses
200 Response
{
"checks": {
"combinedModelSegments": {
"message": "string",
"status": "failing"
},
"containsTrackedSegmentAttributes": {
"message": "string",
"status": "failing"
},
"driftTracking": {
"message": "string",
"status": "failing"
},
"featureDataTypes": {
"message": "string",
"status": "failing"
},
"features": {
"message": "string",
"status": "failing"
},
"humilityRules": {
"message": "string",
"status": "failing"
},
"modelCanBeDeployed": {
"message": "string",
"status": "failing"
},
"modelStatus": {
"message": "string",
"status": "failing"
},
"notCurrentModel": {
"message": "string",
"status": "failing"
},
"permission": {
"message": "string",
"status": "failing"
},
"predictionIntervals": {
"message": "string",
"status": "failing"
},
"predictionReady": {
"message": "string",
"status": "failing"
},
"seriesType": {
"message": "string",
"status": "failing"
},
"supported": {
"message": "string",
"status": "failing"
},
"target": {
"message": "string",
"status": "failing"
},
"targetClasses": {
"message": "string",
"status": "failing"
},
"targetType": {
"message": "string",
"status": "failing"
},
"timeSeriesCompatibility": {
"message": "string",
"status": "failing"
},
"validChallenger": {
"message": "string",
"status": "failing"
}
},
"message": "string",
"status": "failing"
}
Responses
To perform this operation, you must be authenticated by means of one of the following methods:
BearerAuth
Schemas
ModelReplacementSubmission
{
"modelId": "string",
"modelPackageId": "string",
"reason": "ACCURACY",
"runtimeParameterValues": "string"
}
Properties
| Name |
Type |
Required |
Restrictions |
Description |
| modelId |
string |
false |
|
ID of the model used to replace deployment's champion model. Required if modelPackageId is not provided. |
| modelPackageId |
string |
false |
|
ID of the model package used to replace deployment's champion model. Required if modelId is not provided. |
| reason |
string |
true |
|
Reason for the model replacement. |
| runtimeParameterValues |
string |
false |
|
Inject values into a model at runtime. The fieldName must match a fieldName defined in the model package. This list is merged with any existing runtime values set through the deployed model package. This property is gated behind the feature flags ['CUSTOM_MODEL_EDIT_RUNTIME_PARAMETERS_ON_DEPLOYMENT']. To enable this feature, you can contact your DataRobot representative or administrator. |
Enumerated Values
| Property |
Value |
| reason |
[ACCURACY, DATA_DRIFT, ERRORS, SCHEDULED_REFRESH, SCORING_SPEED, DEPRECATION, OTHER] |
ModelReplacementValidationRequest
{
"modelId": "string",
"modelPackageId": "string"
}
Properties
| Name |
Type |
Required |
Restrictions |
Description |
| modelId |
string |
false |
|
ID of the model used to replace deployment's champion model. Required if modelPackageId is not provided. |
| modelPackageId |
string |
false |
|
ID of the model package used to replace deployment's champion model. Required if modelId is not provided. |
ModelReplacementValidationResponse
{
"checks": {
"combinedModelSegments": {
"message": "string",
"status": "failing"
},
"containsTrackedSegmentAttributes": {
"message": "string",
"status": "failing"
},
"driftTracking": {
"message": "string",
"status": "failing"
},
"featureDataTypes": {
"message": "string",
"status": "failing"
},
"features": {
"message": "string",
"status": "failing"
},
"humilityRules": {
"message": "string",
"status": "failing"
},
"modelCanBeDeployed": {
"message": "string",
"status": "failing"
},
"modelStatus": {
"message": "string",
"status": "failing"
},
"notCurrentModel": {
"message": "string",
"status": "failing"
},
"permission": {
"message": "string",
"status": "failing"
},
"predictionIntervals": {
"message": "string",
"status": "failing"
},
"predictionReady": {
"message": "string",
"status": "failing"
},
"seriesType": {
"message": "string",
"status": "failing"
},
"supported": {
"message": "string",
"status": "failing"
},
"target": {
"message": "string",
"status": "failing"
},
"targetClasses": {
"message": "string",
"status": "failing"
},
"targetType": {
"message": "string",
"status": "failing"
},
"timeSeriesCompatibility": {
"message": "string",
"status": "failing"
},
"validChallenger": {
"message": "string",
"status": "failing"
}
},
"message": "string",
"status": "failing"
}
Properties
| Name |
Type |
Required |
Restrictions |
Description |
| checks |
ValidationChecks |
true |
|
A more granular explanation of why the replacement model was eligible or ineligible. |
| message |
string |
true |
|
Message of the overall validation check. |
| status |
string |
true |
|
Status of the overall validation check. |
Enumerated Values
| Property |
Value |
| status |
[failing, passing, warning] |
ValidationCheck
{
"message": "string",
"status": "failing"
}
Whether the replacement model has the same target name as the current model.
Properties
| Name |
Type |
Required |
Restrictions |
Description |
| message |
string |
true |
|
Message of the validation check. |
| status |
string |
true |
|
Status of the validation check. |
Enumerated Values
| Property |
Value |
| status |
[failing, passing, warning] |
ValidationChecks
{
"combinedModelSegments": {
"message": "string",
"status": "failing"
},
"containsTrackedSegmentAttributes": {
"message": "string",
"status": "failing"
},
"driftTracking": {
"message": "string",
"status": "failing"
},
"featureDataTypes": {
"message": "string",
"status": "failing"
},
"features": {
"message": "string",
"status": "failing"
},
"humilityRules": {
"message": "string",
"status": "failing"
},
"modelCanBeDeployed": {
"message": "string",
"status": "failing"
},
"modelStatus": {
"message": "string",
"status": "failing"
},
"notCurrentModel": {
"message": "string",
"status": "failing"
},
"permission": {
"message": "string",
"status": "failing"
},
"predictionIntervals": {
"message": "string",
"status": "failing"
},
"predictionReady": {
"message": "string",
"status": "failing"
},
"seriesType": {
"message": "string",
"status": "failing"
},
"supported": {
"message": "string",
"status": "failing"
},
"target": {
"message": "string",
"status": "failing"
},
"targetClasses": {
"message": "string",
"status": "failing"
},
"targetType": {
"message": "string",
"status": "failing"
},
"timeSeriesCompatibility": {
"message": "string",
"status": "failing"
},
"validChallenger": {
"message": "string",
"status": "failing"
}
}
A more granular explanation of why the replacement model was eligible or ineligible.
Properties
| Name |
Type |
Required |
Restrictions |
Description |
| combinedModelSegments |
ValidationCheck |
false |
|
Whether the replacement model has the same target name as the current model. |
| containsTrackedSegmentAttributes |
ValidationCheck |
false |
|
Whether the replacement model has the same target name as the current model. |
| driftTracking |
ValidationCheck |
false |
|
Whether the replacement model has the same target name as the current model. |
| featureDataTypes |
ValidationCheck |
false |
|
Whether the replacement model has the same target name as the current model. |
| features |
ValidationCheck |
false |
|
Whether the replacement model has the same target name as the current model. |
| humilityRules |
ValidationCheck |
false |
|
Whether the replacement model has the same target name as the current model. |
| modelCanBeDeployed |
ValidationCheck |
false |
|
Whether the replacement model has the same target name as the current model. |
| modelStatus |
ValidationCheck |
false |
|
Whether the replacement model has the same target name as the current model. |
| notCurrentModel |
ValidationCheck |
false |
|
Whether the replacement model has the same target name as the current model. |
| permission |
ValidationCheck |
false |
|
Whether the replacement model has the same target name as the current model. |
| predictionIntervals |
ValidationCheck |
false |
|
Whether the replacement model has the same target name as the current model. |
| predictionReady |
ValidationCheck |
false |
|
Whether the replacement model has the same target name as the current model. |
| seriesType |
ValidationCheck |
false |
|
Whether the replacement model has the same target name as the current model. |
| supported |
ValidationCheck |
false |
|
Whether the replacement model has the same target name as the current model. |
| target |
ValidationCheck |
false |
|
Whether the replacement model has the same target name as the current model. |
| targetClasses |
ValidationCheck |
false |
|
Whether the replacement model has the same target name as the current model. |
| targetType |
ValidationCheck |
false |
|
Whether the replacement model has the same target name as the current model. |
| timeSeriesCompatibility |
ValidationCheck |
false |
|
Whether the replacement model has the same target name as the current model. |
| validChallenger |
ValidationCheck |
false |
|
Whether the replacement model has the same target name as the current model. |