Create model packages¶
Model packages are created and stored in the Model Registry, where you can deploy and share them. The way in which you create model packages—archived model artifacts with associated metadata—is dependent on the type of model being used to create the package.
Manual model package creation:
- Create a model package from the Leaderboard
- Add a custom inference model to the registry
- Register an external model
- Deploy an external model package
Automatic model package creation:
Create model packages manually¶
The following sections describe the steps necessary for manually creating model packages for custom inference models and external models. Custom inference models are created and tested in the Custom Model Workshop and external models operate outside of DataRobot, monitored by the MLOps agent.
Create a model package from the Leaderboard¶
To add a DataRobot model trained with AutoML:
- Select the model from the Leaderboard.
Click Predict > Deploy and click Add to Model Registry.
You can later deploy the model from the Model Registry.
Add a custom inference model¶
You can create a model package for a custom inference model to replace the model package in existing deployments with a new one, or to share with another user who wants to deploy your custom model package.
When you have successfully created and tested a custom inference model, you have the option to add it to the Model Registry as a model package. To do so, navigate to Model Registry > Custom Model Workshop and select the custom model you wish to add.
Under the Test and Deploy tab, click Add to registry.
The custom model is then added to the Model Registry. The Add to registry link is replaced with View registry package, which if clicked, takes you to your newly created model package in the registry under the Model Packages tab.
Note that although a model package can be created without testing the custom model, DataRobot recommends that you confirm the model passes testing before proceeding. Untested custom models prompt a dialog box warning that the custom model is not tested.
For untested custom models, click Test now to start a model test, or Create package without testing to proceed with the creation of a model package.
Register external model packages¶
To create a model package for an external model that is monitored by the monitoring agent, navigate to Model Registry > Model Packages. Click Add new package and select New external model package.
In the resulting dialog box, complete the fields pertaining to the agent-monitored model from which you are retrieving statistics.
The following table describes the fields:
|Package Name||The name of the model package.|
|Package Description (optional)||Information to describe the model package.|
|Model location (optional)||The location of the model running outside of DataRobot. Describe the location as a filepath, such as folder1/opt/model.tar.|
|Build environment||The programming language in which the model was built.|
|Training data (optional)||The filename of the training data, uploaded locally or via the AI Catalog. Click Clear selection to upload and use a different file.|
|Holdout data (optional)||The filename of the holdout data, uploaded locally or via the AI Catalog. Use holdout data to set an accuracy baseline and enable support for target drift and challenger models.|
|Target||The dataset column name the model will predict on.|
|Prediction type||The type of prediction the model is making, either binary classification or regression. For a classification model, you must also provide the positive and negative class labels and a prediction threshold.|
|Prediction column||The column name in the holdout dataset containing the prediction result.|
If registering a time series model, mark the checkbox This is a time series model. You must complete additional fields:
|Forecast date feature||The column in the training dataset that contains date/time values used by DataRobot to detect the range of dates (the valid forecast range) available for use as the forecast point.|
|Date/time format||The format used by the date/time features in the training dataset.|
|Forecast point feature||The column in the training dataset that contains the point from which you are making a prediction.|
|Forecast unit||The time unit (seconds, days, months, etc.) that comprise the time step.|
|Forecast distance feature||The column in the training dataset containing a unique time step—a relative position—within the forecast window. A time series model outputs one row for each forecast distance.|
|Series identifier (optional, used for multiseries models||The column in the training dataset that identifies which series each row belongs to.|
Once all fields for the model package are defined, click Create package. The package populates in the Model Registry and is available for use.
Set an accuracy baseline¶
To set an accuracy baseline for external models (which enables target drift and challenger models when deployed), you must provide holdout data. This is because DataRobot cannot use the model to generate predictions that typically serve as a baseline, as the model is hosted in a remote prediction environment outside of the application. Provide holdout data when registering an external model package and specify the column containing predictions.
Create model packages automatically¶
Deploy custom models¶
When you deploy a custom model, DataRobot automatically creates a model package, which you can access in the Model Registry under the Model Packages tab. The deployment you create also uses this model package.
Deployment from the inventory¶
When you create a new deployment with any type of model, DataRobot automatically creates a model package for the model being deployed. You can access it in the Model Registry under the Model Packages tab.