In DataRobot, a model deployment is the act of launching a DataRobot model to a dedicated prediction cluster using the model monitoring system. It is still possible to make predictions with models that have not been deployed in this way, but users will not be able to access the model monitoring information available via this API without deploying via the model monitoring system.

Retrieving Model Deployments

Before you can retrieve information on a model deployment, you must first request the deployment. This requires deploying a specific model from a specific DataRobot project, and giving the deployment an informative label to describe the model.

projectId <- GetProjectList()$projectId[[1]]
model <- ListModels(projectId)[[1]]
RequestModelDeployment(projectId, model$modelId, label = "GBM Model for Loan Decisioning")

You can then get information on all model deployments using ListModelDeployments(). Note that this function lists information on all deployments across all projects.

print(ListModelDeployments()[[1]])

$modelHealth [1] “passing”

$requestRates [1] 0 0 0 0 0 0 0 0

$updatedAt [1] “2018-04-23 05:23:54.310000”

$recentRequestCount [1] 0

$id [1] “5add6a95e3cd9b0f6b5e0da9”

$createdAt [1] “2018-04-23 05:09:41.405000”

$trendTimeWindow [1] “1d”

$label [1] “fun2”

$instance $instance$datarobotKey [1] “7d13ed21-f277-e6cc-7f39-dfea5adeb331”

$instance$hostName [1] “59b3784569d47f0e030cbe2e.orm.datarobot.com”

$instance$id [1] “59b3784569d47f0e030cbe2e”

$instance$sslEnabled [1] TRUE

$relativeRequestsTrend [1] 0

$type [1] “dedicated”

$status [1] “active”

$description NULL

$serviceHealthMessages list()

$user $user$username [1] “peter.hurford@datarobot.com

$user$lastName [1] “Hurford”

$user$id [1] “597e856b4943d20d14625dfa”

$user$firstName [1] “Peter”

$serviceHealth [1] “passing”

$predictionEndpoint [1] “pred-squad.orm.datarobot.com”

$organizationId [1] “594179646d022d151554594e”

$project $ NULL

$projectName [1] “Boston Housing”

$fileName [1] “data.csv”

$stage [1] “modeling”

$autopilotMode [1] 0

$created [1] “2018-03-09T14:49:07.194003Z”

$target [1] “target”

$metric [1] “RMSE”

$partition $partition$datetimeCol NULL

$partition$cvMethod [1] “random”

$partition$validationPct NULL

$partition$holdoutPct [1] 20.05

$partition$reps [1] 5

$partition$cvHoldoutLevel NULL

$partition$holdoutLevel NULL

$partition$userPartitionCol NULL

$partition$validationType [1] “CV”

$partition$trainingLevel NULL

$partition$partitionKeyCols NULL

$partition$useTimeSeries NULL

$partition$validationLevel NULL

$recommender $recommender$recommenderItemId NULL

$recommender$isRecommender NULL

$recommender$recommenderUserId NULL

$advancedOptions $advancedOptions$scaleoutModelingMode [1] “disabled”

$advancedOptions$responseCap [1] FALSE

$advancedOptions$downsampledMinorityRows NULL

$advancedOptions$downsampledMajorityRows NULL

$advancedOptions$blueprintThreshold NULL

$advancedOptions$seed NULL

$advancedOptions$weights NULL

$advancedOptions$smartDownsampled [1] FALSE

$advancedOptions$majorityDownsamplingRate NULL

$positiveClass NULL

$maxTrainPct [1] 63.862

$maxTrainRows [1] 258

$scaleoutMaxTrainPct [1] 63.862

$scaleoutMaxTrainRows [1] 258

$holdoutUnlocked [1] TRUE

$targetType [1] “Regression”

attr(,“class”) [1] “dataRobotProject”

$model $model$uid [1] “597e856b4943d20d14625dfa”

$model$modelType [1] “Breiman and Cutler Random Forest Regressor”

$model$id [1] “5aa29f01e6448d6f9fdc3921”

$prevRequestCount [1] 0

attr(,“class”) [1] “dataRobotModelDeployment”

kable(head(summary(ListModelDeployments())))
id label modelType modelId createdAt updatedAt modelHealth serviceHealth recentRequestCount type
5add6a95e3cd9b0f6b5e0da9 fun2 Breiman and Cutler Random Forest Regressor 5aa29f01e6448d6f9fdc3921 2018-04-23 05:09:41.405000 2018-04-23 05:23:54.310000 passing passing NULL dedicated
5aa2a5890acd7f2cc22c8185 NULL Gradient Boosted Greedy Trees Regressor (Least-Squares Loss) 5aa29f01e6448d6f9fdc3933 2018-03-09 15:17:29.735000 2018-03-09 15:17:29.735000 passing passing NULL dedicated
5aa2a5bf0acd7f2ca168531d NULL eXtreme Gradient Boosted Trees Regressor 5aa29f01e6448d6f9fdc3925 2018-03-09 15:18:23.371000 2018-03-09 15:18:23.371000 passing passing NULL dedicated
5adc013b4d8976656a92ef42 NULL eXtreme Gradient Boosted Trees Classifier with Early Stopping 5ad796b1e3cd9b209cebffaa 2018-04-22 03:27:55.313000 2018-04-22 03:27:55.313000 passing passing NULL dedicated
5aa2a4db0acd7f2a0a170b4f Gradient Boosted Trees Regressor (Least-Squares Loss) 03/09/2018 09:14:17 Gradient Boosted Trees Regressor (Least-Squares Loss) 5aa2a454fe07593219f3ffcf 2018-03-09 15:14:35.381000 2018-04-23 04:44:58.486000 passing passing NULL dedicated
5adde652e3cd9b30b7df36cd GBM Model for Loan Decisioning eXtreme Gradient Boosted Trees Classifier with Early Stopping 5ad796b1e3cd9b209cebffaa 2018-04-23 13:57:38.760000 2018-04-23 13:57:38.760000 passing passing NULL dedicated

You can use the limit param to only return a certain amount of model deployments.

modelDeployments <- ListModelDeployments(limit = 2)
kable(head(summary(modelDeployments)), longtable = TRUE, booktabs = TRUE, row.names = TRUE)
id label modelType modelId createdAt updatedAt modelHealth serviceHealth recentRequestCount type
1 5add6a95e3cd9b0f6b5e0da9 fun2 Breiman and Cutler Random Forest Regressor 5aa29f01e6448d6f9fdc3921 2018-04-23 05:09:41.405000 2018-04-23 05:23:54.310000 passing passing NULL dedicated
2 5aa2a5890acd7f2cc22c8185 NULL Gradient Boosted Greedy Trees Regressor (Least-Squares Loss) 5aa29f01e6448d6f9fdc3933 2018-03-09 15:17:29.735000 2018-03-09 15:17:29.735000 passing passing NULL dedicated

You can use orderBy to determine the order that model deployments are retrieved (and limited).

modelDeployments <- ListModelDeployments(limit = 2, orderBy = "-label")
kable(head(summary(modelDeployments)), longtable = TRUE, booktabs = TRUE, row.names = TRUE)
id label modelType modelId createdAt updatedAt modelHealth serviceHealth recentRequestCount type
1 5add6a95e3cd9b0f6b5e0da9 fun2 Breiman and Cutler Random Forest Regressor 5aa29f01e6448d6f9fdc3921 2018-04-23 05:09:41.405000 2018-04-23 05:23:54.310000 passing passing NULL dedicated
2 5aa2a4db0acd7f2a0a170b4f Gradient Boosted Trees Regressor (Least-Squares Loss) 03/09/2018 09:14:17 Gradient Boosted Trees Regressor (Least-Squares Loss) 5aa2a454fe07593219f3ffcf 2018-03-09 15:14:35.381000 2018-04-23 04:44:58.486000 passing passing NULL dedicated

You can use offset to skip that many deployments.

modelDeployments <- ListModelDeployments(offset = 2)
kable(head(summary(modelDeployments)), longtable = TRUE, booktabs = TRUE, row.names = TRUE)
id label modelType modelId createdAt updatedAt modelHealth serviceHealth recentRequestCount type
1 5aa2a5bf0acd7f2ca168531d NULL eXtreme Gradient Boosted Trees Regressor 5aa29f01e6448d6f9fdc3925 2018-03-09 15:18:23.371000 2018-03-09 15:18:23.371000 passing passing NULL dedicated
2 5adc013b4d8976656a92ef42 NULL eXtreme Gradient Boosted Trees Classifier with Early Stopping 5ad796b1e3cd9b209cebffaa 2018-04-22 03:27:55.313000 2018-04-22 03:27:55.313000 passing passing NULL dedicated
3 5aa2a4db0acd7f2a0a170b4f Gradient Boosted Trees Regressor (Least-Squares Loss) 03/09/2018 09:14:17 Gradient Boosted Trees Regressor (Least-Squares Loss) 5aa2a454fe07593219f3ffcf 2018-03-09 15:14:35.381000 2018-04-23 04:44:58.486000 passing passing NULL dedicated
4 5adde652e3cd9b30b7df36cd GBM Model for Loan Decisioning eXtreme Gradient Boosted Trees Classifier with Early Stopping 5ad796b1e3cd9b209cebffaa 2018-04-23 13:57:38.760000 2018-04-23 13:57:38.760000 passing passing NULL dedicated

You can use query to search for a particular model deployment via searching the label and description.

modelDeployments <- ListModelDeployments(query = "Decisioning")
kable(head(summary(modelDeployments)), longtable = TRUE, booktabs = TRUE, row.names = TRUE)
id label modelType modelId createdAt updatedAt modelHealth serviceHealth recentRequestCount type
1 5adde652e3cd9b30b7df36cd GBM Model for Loan Decisioning eXtreme Gradient Boosted Trees Classifier with Early Stopping 5ad796b1e3cd9b209cebffaa 2018-04-23 13:57:38.760000 2018-04-23 13:57:38.760000 passing passing NULL dedicated

You can use status to filter models to a particular model deployment status.

modelDeployments <- ListModelDeployments(status = "Active")
kable(head(summary(modelDeployments)), longtable = TRUE, booktabs = TRUE, row.names = TRUE)
id label modelType modelId createdAt updatedAt modelHealth serviceHealth recentRequestCount type
1 5add6a95e3cd9b0f6b5e0da9 fun2 Breiman and Cutler Random Forest Regressor 5aa29f01e6448d6f9fdc3921 2018-04-23 05:09:41.405000 2018-04-23 05:23:54.310000 passing passing NULL dedicated
2 5aa2a5890acd7f2cc22c8185 NULL Gradient Boosted Greedy Trees Regressor (Least-Squares Loss) 5aa29f01e6448d6f9fdc3933 2018-03-09 15:17:29.735000 2018-03-09 15:17:29.735000 passing passing NULL dedicated
3 5aa2a5bf0acd7f2ca168531d NULL eXtreme Gradient Boosted Trees Regressor 5aa29f01e6448d6f9fdc3925 2018-03-09 15:18:23.371000 2018-03-09 15:18:23.371000 passing passing NULL dedicated
4 5adc013b4d8976656a92ef42 NULL eXtreme Gradient Boosted Trees Classifier with Early Stopping 5ad796b1e3cd9b209cebffaa 2018-04-22 03:27:55.313000 2018-04-22 03:27:55.313000 passing passing NULL dedicated
5 5aa2a4db0acd7f2a0a170b4f Gradient Boosted Trees Regressor (Least-Squares Loss) 03/09/2018 09:14:17 Gradient Boosted Trees Regressor (Least-Squares Loss) 5aa2a454fe07593219f3ffcf 2018-03-09 15:14:35.381000 2018-04-23 04:44:58.486000 passing passing NULL dedicated
6 5adde652e3cd9b30b7df36cd GBM Model for Loan Decisioning eXtreme Gradient Boosted Trees Classifier with Early Stopping 5ad796b1e3cd9b209cebffaa 2018-04-23 13:57:38.760000 2018-04-23 13:57:38.760000 passing passing NULL dedicated

Lastly, if you have a specific model deployment ID, you can use GetModelDeployment to fetch information on that particular deployment.

modelDeployments <- ListModelDeployments()
modelDeployment <- GetModelDeployment(modelDeployments[[1]]$id)
print(modelDeployment)

$modelHealth [1] “passing”

$requestRates [1] 0 0 0 0 0 0 0 0

$updatedAt [1] “2018-04-23 05:23:54.310000”

$recentRequestCount [1] 0

$id [1] “5add6a95e3cd9b0f6b5e0da9”

$createdAt [1] “2018-04-23 05:09:41.405000”

$trendTimeWindow [1] “1d”

$label [1] “fun2”

$instance $instance$datarobotKey [1] “7d13ed21-f277-e6cc-7f39-dfea5adeb331”

$instance$hostName [1] “59b3784569d47f0e030cbe2e.orm.datarobot.com”

$instance$id [1] “59b3784569d47f0e030cbe2e”

$instance$sslEnabled [1] TRUE

$deployed [1] FALSE

$relativeRequestsTrend [1] 0

$type [1] “dedicated”

$status [1] “active”

$description NULL

$serviceHealthMessages msgId message level 1 NO_GOOD_REQUESTS No successful predictions in 24 hours passing

$user $user$username [1] “peter.hurford@datarobot.com

$user$lastName [1] “Hurford”

$user$id [1] “597e856b4943d20d14625dfa”

$user$firstName [1] “Peter”

$serviceHealth [1] “passing”

$predictionEndpoint [1] “pred-squad.orm.datarobot.com”

$organizationId [1] “594179646d022d151554594e”

$project $ NULL

$projectName [1] “Boston Housing”

$fileName [1] “data.csv”

$stage [1] “modeling”

$autopilotMode [1] 0

$created [1] “2018-03-09T14:49:07.194003Z”

$target [1] “target”

$metric [1] “RMSE”

$partition $partition$datetimeCol NULL

$partition$cvHoldoutLevel NULL

$partition$validationPct NULL

$partition$useTimeSeries NULL

$partition$reps [1] 5

$partition$cvMethod [1] “random”

$partition$holdoutLevel NULL

$partition$userPartitionCol NULL

$partition$validationType [1] “CV”

$partition$trainingLevel NULL

$partition$partitionKeyCols NULL

$partition$holdoutPct [1] 20.05

$partition$validationLevel NULL

$recommender $recommender$recommenderItemId NULL

$recommender$isRecommender NULL

$recommender$recommenderUserId NULL

$advancedOptions $advancedOptions$scaleoutModelingMode [1] “disabled”

$advancedOptions$responseCap [1] FALSE

$advancedOptions$downsampledMinorityRows NULL

$advancedOptions$downsampledMajorityRows NULL

$advancedOptions$blueprintThreshold NULL

$advancedOptions$seed NULL

$advancedOptions$weights NULL

$advancedOptions$smartDownsampled [1] FALSE

$advancedOptions$majorityDownsamplingRate NULL

$positiveClass NULL

$maxTrainPct [1] 63.862

$maxTrainRows [1] 258

$scaleoutMaxTrainPct [1] 63.862

$scaleoutMaxTrainRows [1] 258

$holdoutUnlocked [1] TRUE

$targetType [1] “Regression”

attr(,“class”) [1] “dataRobotProject”

$model $model$uid [1] “597e856b4943d20d14625dfa”

$model$modelType [1] “Breiman and Cutler Random Forest Regressor”

$model$id [1] “5aa29f01e6448d6f9fdc3921”

$prevRequestCount [1] 0

attr(,“class”) [1] “dataRobotModelDeployment”

Updating a Model Deployment

After a model deployment is made, the label, description, and status can be updated using UpdateModelDeployment. Here, the label and the status are both changed:

modelDeployments <- ListModelDeployments()
UpdateModelDeployment(modelDeployments[[1]]$id, label = "Archived GBM", status = "archived")

$modelHealth [1] “passing”

$requestRates [1] 0 0 0 0 0 0 0 0

$updatedAt [1] “2018-04-26 17:00:23.453000”

$recentRequestCount [1] 0

$id [1] “5aa2a5890acd7f2cc22c8185”

$createdAt [1] “2018-03-09 15:17:29.735000”

$trendTimeWindow [1] “1d”

$label [1] “Archived GBM”

$instance $instance$datarobotKey [1] “7d13ed21-f277-e6cc-7f39-dfea5adeb331”

$instance$hostName [1] “59b3784569d47f0e030cbe2e.orm.datarobot.com”

$instance$id [1] “59b3784569d47f0e030cbe2e”

$instance$sslEnabled [1] TRUE

$deployed [1] TRUE

$relativeRequestsTrend [1] 0

$type [1] “dedicated”

$status [1] “archived”

$description NULL

$serviceHealthMessages msgId message level 1 NO_GOOD_REQUESTS No successful predictions in 24 hours passing

$user $user$username [1] “peter.hurford@datarobot.com

$user$lastName [1] “Hurford”

$user$id [1] “597e856b4943d20d14625dfa”

$user$firstName [1] “Peter”

$serviceHealth [1] “passing”

$predictionEndpoint [1] “59b3784569d47f0e030cbe2e.orm.datarobot.com”

$organizationId [1] “594179646d022d151554594e”

$project $ NULL

$projectName [1] “Boston Housing”

$fileName [1] “data.csv”

$stage [1] “modeling”

$autopilotMode [1] 0

$created [1] “2018-03-09T14:49:07.194003Z”

$target [1] “target”

$metric [1] “RMSE”

$partition $partition$datetimeCol NULL

$partition$cvHoldoutLevel NULL

$partition$validationPct NULL

$partition$useTimeSeries NULL

$partition$reps [1] 5

$partition$cvMethod [1] “random”

$partition$holdoutLevel NULL

$partition$userPartitionCol NULL

$partition$validationType [1] “CV”

$partition$trainingLevel NULL

$partition$partitionKeyCols NULL

$partition$holdoutPct [1] 20.05

$partition$validationLevel NULL

$recommender $recommender$recommenderItemId NULL

$recommender$isRecommender NULL

$recommender$recommenderUserId NULL

$advancedOptions $advancedOptions$scaleoutModelingMode [1] “disabled”

$advancedOptions$responseCap [1] FALSE

$advancedOptions$downsampledMinorityRows NULL

$advancedOptions$downsampledMajorityRows NULL

$advancedOptions$blueprintThreshold NULL

$advancedOptions$seed NULL

$advancedOptions$weights NULL

$advancedOptions$smartDownsampled [1] FALSE

$advancedOptions$majorityDownsamplingRate NULL

$positiveClass NULL

$maxTrainPct [1] 63.862

$maxTrainRows [1] 258

$scaleoutMaxTrainPct [1] 63.862

$scaleoutMaxTrainRows [1] 258

$holdoutUnlocked [1] TRUE

$targetType [1] “Regression”

attr(,“class”) [1] “dataRobotProject”

$model $model$uid [1] “597e856b4943d20d14625dfa”

$model$modelType [1] “Gradient Boosted Greedy Trees Regressor (Least-Squares Loss)”

$model$id [1] “5aa29f01e6448d6f9fdc3933”

$prevRequestCount [1] 0

attr(,“class”) [1] “dataRobotModelDeployment”

Model Deployment Service Statistics

modelDeployments <- ListModelDeployments()
serverHealth <- GetModelDeploymentServiceStatistics(modelDeployments[[1]]$id)
print(serverHealth)

$load $load$median [1] 0

$load$peak [1] 0

$consumers [1] 0

$userErrorRate $userErrorRate$current [1] 0

$userErrorRate$previous [1] 0

$totalRequests [1] 0

$serverErrorRate $serverErrorRate$current [1] 0

$serverErrorRate$previous [1] 0

$period $period$start [1] “2018-04-22 14:28:53.169727+00:00”

$period$end [1] “2018-04-23 14:28:53.169727+00:00”

$medianExecutionTime NULL

$totalPredictionRows [1] 0

attr(,“class”) [1] “dataRobotModelDeploymentServiceHealth”

Model Deployment Action Log

modelDeployments <- ListModelDeployments()
actionLog <- GetModelDeploymentActionLog(modelDeployments[[1]]$id)
print(actionLog)

[[1]] [[1]]$action [1] “created”

[[1]]$performedAt [1] “2018-03-09 14:51:15.300729”

[[1]]$performedBy [[1]]$performedBy$username [1] “peter.hurford@datarobot.com

[[1]]$performedBy$lastName [1] “Hurford”

[[1]]$performedBy$id [1] “597e856b4943d20d14625dfa”

[[1]]$performedBy$firstName [1] “Peter”

[[2]] [[2]]$action [1] “deployed”

[[2]]$performedAt [1] “2018-04-23 05:09:41.405000”

[[2]]$performedBy [[2]]$performedBy$username [1] “peter.hurford@datarobot.com

[[2]]$performedBy$lastName [1] “Hurford”

[[2]]$performedBy$id [1] “597e856b4943d20d14625dfa”

[[2]]$performedBy$firstName [1] “Peter”

attr(,“class”) [1] “dataRobotModelDeploymentActionLog”