---
title: Add training data to a custom model
description: How to assign training data to a custom model in the Custom Model Workshop.

---

#  Add training data to a custom model {: #add-training-data-to-a-custom-model }

To enable feature drift tracking for a model deployment, you must add training data. To do this, assign training data to a model version. The method for providing training and holdout datasets for [*unstructured* custom inference models](unstructured-custom-models) requires you to upload the training and holdout datasets separately. Additionally, these datasets cannot include a partition column. 

!!! warning "Deprecation notice"
    Currently, you assign training data directly to a custom model, meaning every version of that model uses the same data; however, this assignment method is deprecated and scheduled for removal. It remains the default method during the deprecation period, even for newly created models, to support backward compatibility.

!!! warning "File size warning"
    When adding training data to a custom model, the training data can be subject to a [frozen run](frozen-run) to conserve RAM and CPU resources, limiting the file size of the training dataset to 1.5GB.

=== "Assign to a model version"

    1. In **Model Registry** > **Custom Model Workshop**, in the **Models** list, select the model you want to add training data to.

    2. To assign training data to a custom model's versions, you must convert the model. On the **Assemble** tab, locate the **Training data for model versions** alert and click **Permanently convert**:

        !!! warning
            Converting a model's training data assignment method is a one-way action. It _cannot_ be reverted. After conversion, you can't assign training data at the model level. This change applies to the UI _and_ the API. If your organization has any automation depending on "per model" training data assignment, before you convert a model, you should update any related automation to support the new workflow. As an alternative, you can create a new custom model to convert to the "per version" training data assignment method and maintain the deprecated "per model" method on the model required for the automation; however, you should update your automation before the deprecation process is complete to avoid gaps in functionality.

        ![](images/convert-custom-model.png)

        If the model was already assigned training data, after you convert the model, the **Datasets** section contains information about the existing training dataset.

        ![](images/after-conversion-info.png)

    3. On the **Assemble** tab, next to **Datasets**: 
    
        * If the model version _doesn't_ have training data assigned, click **Assign**:

            ![](images/cmodel-12.png)
        
        * If the model version _does_ have training data assigned, click the edit icon (![](images/icon-pencil.png)), and, in the **Change Training Data** dialog box, click the delete icon (![](images/icon-delete.png)) to remove the existing training data.

    4. In the **Add Training Data** (or **Change Training Data**) dialog box, click and drag a training dataset file into the **Training Data** box, or click **Choose file** and do either of the following:

        * Click **Local file**, select a file from your local storage, and then click **Open**.

        * Click **AI Catalog**, select a training dataset you previously uploaded to DataRobot, and click **Use this dataset**.

        ![](images/cmodel-13.png)

        !!! important "Include features required for scoring"
            The columns in a custom model's training data indicate which features are included in scoring requests to the deployed custom model; therefore, once training data is available, any features not included in the training dataset aren't sent to the model. This requirement does not apply to predictions made while [testing a custom model](custom-model-test).

    5. _Optional_. **Specify the column name containing partitioning info for your data** (based on training/validation/holdout partitioning). If you plan to deploy the custom model and monitor its [data drift](data-drift) and [accuracy](deploy-accuracy), specify the holdout partition in the column to establish an accuracy baseline.

        !!! important
            You can track data drift and accuracy without specifying a partition column; however, in that scenario, DataRobot won't have baseline values. The selected partition column should only include the values `T`, `V`, or `H`.

    6. When the upload is complete, click **Add Training Data**.

        ??? note "Training data assignment error"
            If the training data assignment fails, an error message appears in the new custom model version under **Datasets**. While this error is active, you can't create a model package to deploy the affected version. To resolve the error and deploy the model package, reassign training data to create a new version, or create a new version and _then_ assign training data.

=== "Assign to a model (deprecated)"

    If you want to add training data to a custom inference model (which allows you to deploy it), you can do so by selecting a custom model and navigating to the **Model Info** tab.

    The **Model Info** tab lists custom inference model attributes. Click **Add Training Data**.

    ![](images/cmodel-12-deprecated.png)

    A pop-up appears, prompting you to upload training data.

    ![](images/cmodel-13.png)

    Click **Choose file** to upload training data. Optionally, you can specify the column name containing the partitioning information for your data (based on training/validation/holdout partitioning). If you plan to deploy the custom model and monitor its [accuracy](deploy-accuracy), specify the holdout partition in the column to establish an accuracy baseline. You can still track accuracy without specifying a partition column; however, there will be no accuracy baseline. When the upload is complete, click **Add Training Data**.

    !!! important "Include features required for scoring"
        The columns in a custom model's training data indicate which features are included in scoring requests to the deployed custom model; therefore, once training data is available, any features not included in the training dataset aren't sent to the model. This requirement does not apply to predictions made while [testing a custom model](custom-model-test).
