---
title: Manage key values
description: View and manage key values for a registered model version in the NextGen Registry.
section_name: NextGen Registry
maturity: open-public-preview

---

# Manage key values for registered model versions {: #manage-key-values-for-registered-model-versions }

After you register [DataRobot](nxt-register-dr-models) or [external](nxt-register-dr-models) models, you can add key values and edit existing (user-created) key values from the Registry. For more information on key values, see the [documentation](reg-key-values){ target=_blank }.

## Add key values {: #add-key-values }

To add a new key value to a registered model version:

1. On the **Model directory** page, in the table of registered models, click the registered model containing the version you want to manage key values for, opening the list of versions. 

2. In the list of versions, click the version you want to edit, opening the registered model version panel:

    ![](images/nxt-view-version-info.png)

3. Click the **Overview** tab and locate the **Key values** section.

4. In the group box for a key values category, click **+ Add** (or, if one or more key values exist for that category, click **+ Add tag**, **+ Add metric**, etc.).

    ![](images/nxt-add-button-reg-model-kvs.png)

5. In the **Add key value(s)** dialog box, select one of the following:

    === "Add new"

        To add a new key value to a registered model version, configure the following fields:

        ![](images/nxt-add-reg-model-kvs.png)

        Setting     | Description
        ------------|------------------
        Category    | Defaults to the category of the group box where you clicked **+ Add**. Select one of the following categories for the new key value to organize your key values by purpose: <ul><li>**Training parameter**</li><li>**Metric**</li><li>**Tag**</li><li>**Artifact**</li><li>**Runtime parameter**</li></ul>
        Value type  | Select one of the following value types for the new key value: <ul><li>**String**</li><li>**Numeric**</li><li>**Boolean**</li><li>**URL**</li><li>**JSON**</li><li>**YAML**</li></ul>
        Name        | Enter a descriptive name for the key in the key-value pair.
        Value       | If you selected one of the following value types, enter the appropriate data:<ul><li>**String**: Enter any string up to 4 KB.</li><li>**Numeric**: Enter an integer or floating-point number.</li><li>**Boolean**: Select **True** or **False**.</li><li>**URL**: A URL in the format `scheme://location`; for example, `https://example.com`. DataRobot does not fetch the URL or provide a link to this URL in the user interface; however, in a downloaded compliance document, the URL may appear as a link.</li><li>**JSON**: Enter or upload JSON as a string. This JSON must parse correctly; otherwise, DataRobot won't accept it.</li><li>**YAML**: Enter or upload YAML as a string. DataRobot does not validate this YAML.</li></ul>
        Description | _(Optional)_ Enter a description of the key value's purpose.

    === "Copy from previous"

        To copy key values from a previous registered model version, select **All categories** or a single category, and then click **Add** to copy the key values:

        ![](images/nxt-copy-reg-model-kvs.png)

        If a key value with the same name exists in the newer version and it is not read-only, the value from the older version will overwrite it. Otherwise, a new key value with that name is created in the newer version. If you edit either key value to use a different file, the other key value is unaffected, and the file is no longer shared. System key values are not included in bulk copy; for example, `model.version` is not overwritten in a newer version with the old version's value.

    === "Import with API"

        To import key values through the API, click **Copy to clipboard** to copy the Python code snippet for importing key values:

        ![](images/nxt-api-reg-model-kvs.png)

        This is a Python template for adding key values to a registered model version. Replace the implementation of `fetch_values()` with code that obtains the metrics, tags, parameters, and artifacts to import as key values for the DataRobot model version. You must provide your API key as an environment variable: `export MLOPS_API_TOKEN=<value of API token from Developer Tools page>`.

3. Click **Submit** to save the key value. The new key appears in the list for the selected **Category**.


## Edit or delete key values {: #edit-or-delete-key-values }

To edit or delete added, copied, or imported key values:

1. On the **Model directory** page, in the table of registered models, click the registered model containing the version you want to manage key values for, opening the list of versions. 

2. In the list of versions, click the version you want to edit, opening the registered model version panel:

    ![](images/nxt-view-version-info.png)

3. Click the **Overview** tab, locate the **Key values** section, and do either of the following:

    * Click :fontawesome-solid-magnifying-glass:{.lg } **Search** to locate the key value you want to edit or delete.

    * Browse the **Tags**, **Metrics**, **Training parameters**, **Runtime parameters**, and **Artifacts** sections to locate editable key values.

4. For key values you've created, you can click the edit (:material-pencil:{.lg}) and delete (:fontawesome-solid-trash-can:{.lg}) icons:

    ![](images/nxt-reg-model-kv-edit-delete.png)
