Extend compliance documentation with key values¶
When you create a model package in the Model Registry, you can generate automated compliance documentation for the model. The compliance documentation provides evidence that the components of the model work as intended, the model is appropriate for its intended business purpose, and the model is conceptually sound. You can build custom compliance documentation templates with references to key values, adding the associated data to the template and limiting the manual editing needed to complete the compliance documentation.
Key values associated with a model in the Model Registry are key-value pairs containing information about the registered model package. Each key-value pair has the following:
Name: The unique and descriptive name of the key (for the model package or version).
Value type: The data type of the value associated with the key. The possible types are string, numeric, boolean, URL, image, dataset, pickle, binary, JSON, or YAML.
Value: The stored data or file.
You can include string, numeric, boolean, image, and dataset key values in custom compliance documentation templates. When you generate compliance documentation for a model package using a custom template referencing a supported key value, DataRobot inserts the matching values from the associated model package; for example, if the key value has an image attached, building the compliance documentation inserts that image, or if the key value refers to a dataset, it inserts the first 100 rows and 42 columns of the dataset.
DataRobot automatically populates key values for registered models you create. These key values are read-only, and their names start with
datarobot.. They are generated when you register a DataRobot model from the Leaderboard or a custom model from the Custom Model Workshop.
DataRobot models: DataRobot creates training parameters and metrics (such as
datarobot.parameter.max_depth), metrics (such as
datarobot.metric.AUC.validation), and tags (such as
datarobot.registered.model.version). The automatic training parameters and metrics depend on the particular DataRobot model.
Custom models: DataRobot creates runtime parameters from the model. The automatic key values depend on the custom model.
Although you can't modify or delete these automatic key values, you can manually add key values as needed to supplement the system-provided values. Your compliance documentation template or integration workflow can use key values from either source.
Create key values¶
In the Model Registry, open a registered model version and access the Key values tab. In the table on this tab, you can view, add, edit, and delete key values, depending on your model package permissions.
Key value permissions
- Read-write key values use the permissions of the model package.
- If you have view permissions for the model package, you can use key values in compliance documentation and search, sort, and filter the key values list.
- If you have edit permissions for the model package, you can also add, edit, and delete key values from the key values list.
When you add a new key value, you can add a string, numeric, boolean, URL, JSON, or YAML key value without an attached file.
To add a new key value:
Click + Add key values > New key value
In the Add new key value dialog box, configure the following settings:
Setting Description Category Select one of the following categories for the new key value to organize your key values by purpose:
- Training parameter
- Runtime parameter
Value type Select one of the following value types for the new key value:
Value If you selected one of the following value types, enter the appropriate data:
- String: Enter any string up to 4 KB.
- Numeric: Enter an integer or floating-point number.
- Boolean: Select True or False.
- 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.
- JSON: Enter or upload JSON as a string. This JSON must parse correctly; otherwise, DataRobot won't accept it.
- YAML: Enter or upload YAML as a string. DataRobot does not validate this YAML.
Upload If you selected one of the following value types, add an artifact by uploading a file:
- Upload a dataset: A CSV file or any other compatible data file ( with a
.zipextension). The file is added as a dataset in the AI catalog, so all file types supported there are also supported for key values.
- Upload an image: A JPEG or PNG file (with a
- Upload a pickle file: A Python PKL file (with the
.pklextension). DataRobot only stores the file for the key value; you can't access or run objects or code in the file.
- Upload a binary file: A file with any file extension. DataRobot stores the file as an opaque object.
Name Enter a descriptive name for the key in the key-value pair. Description (Optional) Enter a description of the key value's purpose.
Click OK to save the key value. The new key appears in the table.
View and manage key values¶
On the Key values tab, you can view key value information and manage your custom key values. You can search key values by name (full or partial) and refresh the list. You can also filter by the categories shown. If the model package has more than 10 key values, the list is paginated.
Additional controls are located in the Actions column:
|You can view values in the following ways:
|Click the edit icon () to edit a key value. You can only edit the name, value, or description. Leaving a comment in the comment field is optional.
|Click the delete icon () to delete a key value. If you delete an image, pickle, or binary key value, and no other key value is using the same file, DataRobot deletes the file from storage. Datasets remain in the AI catalog after deletion.
Customize a compliance documentation template with key values¶
Once you've added key values, you can build custom compliance documentation templates with references to those key values. Referencing key values in a compliance documentation template adds the associated data to the generated compliance documentation, limiting the amount of manual editing needed to complete the compliance documentation.
To reference key values in a compliance documentation template:
Click your profile avatar (or the default avatar ) in the upper-right corner of DataRobot and, under App Admin, click Template Builder.
On the Flexible Documentation Templates page, create or edit a compliance documentation template.
In the template, on the Key Values panel, select a model package with key values from the Model Package list.
To add a key value reference to the template, edit a section, click to place the cursor where you want to insert the reference, then click the key value in the Key Values panel.
You can include string, numeric, boolean, image, and dataset key values in custom compliance documentation templates. After you add a value, you can remove it by deleting the reference from the section.
To preview the document, click Save changes and then click Preview template.
As the template is not applied to any specific model package until you generate the compliance documentation, the preview displays placeholders for the key value.
Copy key values from a previous model package version¶
Registered models have versions; each is an individual model package with an independent set of key values. If you created key values in an earlier version, you can copy these to a newer version:
Navigate to Model Registry > Registered Models page and open the registered model containing the version you want to add key values to.
To open the registered model version, do either of the following:
To open the version in the current tab, click the row for the version you want to access.
To open the version in a new tab, click the open icon () next to the Type column for the version you want to access.
Click + Add key values and, under Other, click Copy key values from previous version.
In the Copy key values to this registered version dialog box, select All categories or a single category.
Click OK to copy the key values.
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. Files for artifact key values (image, dataset, pickle, and binary) are not copied in bulk; instead, the new and old key values share the same file. 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.versionis not overwritten in a newer version with the old version's value.