Create use cases to track all of the facts associated with a model as it moves through the AI lifecycle. For each use case, create approaches to track variations on models. Each approach can represent a different way of solving a problem. For each approach, you can save versions of the model as you work toward your use case solution.
Approaches provide a way to track multiple paths for solving a problem. For example, in a use case that requests a model for analyzing credit risk, you can have approaches for models built using different algorithms, so you can compare the approaches and ultimately choose the best solution for your use case.
Watch this video to see how to create a model use case with approaches
This video provides a visual method to learn the concepts and tasks in this documentation.
Creating an approach in a use case
When you create a new use case, you start with the default approach to address your business problem, and add new approaches as needed. An approach is one path for achieving the goal of the use case.
- Create a use case from the model inventory, or from the Track this model option in a project or a space.
- Assign a name and optional description for the use case.
- From the Assets tab, click the tile for the default approach or create a new approach.
- Enter or update the name and description.
- Optionally update the icon and color scheme for the approach.
- Save your changes.
- Click New approach and repeat the steps to define another approach for the use case.
Adding a model to an approach
When you track a model, you add it to an approach in a use case.
-
Open the model details page from a project, space, or catalog.
-
Click Track this model.
-
Select an existing use case or create a new use case.
-
Select an existing approach where you want to track the model, or create a new approach.
-
Select a type of version that best matches the state for the model. The type affects the version number, which follows a
major.minor.patch
semantic versioning format. If this is the first model in the approach, choose from:- Experimental: the model is just starting in development and the input and output structure are likely to change. This option increments the patch number of the version.
- Stable: the model is in production and you don't expect major changes in input or output. This option sets the major number of the version.
- Custom: define your own starting point. Use custom to create a new version number, following the semantic versioning format of
major.minor.patch
.
Note:If you are saving a version of an existing model, you can update the version using options for Patch, Minor, Major, or Custom version updates.
-
Optionally provide a comment for the version.
-
Once the model is associated with a model record, click Open in model inventory to view the model that is being tracked as part of the use case. Information about the approach and versions display in the model details panel.
Viewing, editing, and removing approaches
You can view, edit, and remove approaches from the model use case.
-
Open the use case in the model inventory to view approaches. Each approach displays all versions that are tracked for the approach.
-
To update approach details, such as the name and description, choose Edit approach from the approach action menu.
-
An approach cannot be deleted if any of the model versions are tracked under the approach. To delete an approach, first, move all models to a different approach. Then, choose Delete from the approach action menu.
Note: You cannot delete the last approach from a use case.
In this example, a model use case has an approach for tracking assets in pre-production, and another approach for tracking assets in production.
Changing the model version or approach
From a model use case, you can edit a model version to update the version or to assign the model to a different aproach. Use this procedure to assign existing models from the default approach to a different approach or to update model versions.
If the version is 'N/A' rather than a numerical version, you must use the API method for changing the version.
- From the Assets page of a model use case, click Edit version for a model entry.
- Optionally assign the model to a different approach. You have the option of choosing an existing approach or creating a new one.
- Click Next.
- Optionally update the version number. Choose one of the pre-defined version changes or create a custom version number.
- Click Track model to save your changes and view the model updates.
Assigning existing tracked models to approaches using APIs
When a cluster is upgraded to Cloud Pak for Data 4.7, all tracked models in a use case are displayed with the version n/a in the default approach. You can assign and manage model versions for existing models using AI Factsheets APIS.
- Create a new approach for assigning new versions of existing models.
- Invoke the API method
getModelUsecaseApproaches
. - From the response payload, get the ID of the approach that you created in the first step.
- Use the API function
getphysicalmodels
to list the existing tracked models. The command returns all the models that are tracked to the use case. Note that in model tracking details, all the models that are rendered in a single row have same value formodel_identity_key
. - From the response payload, get the
model_identity_key value
for the row of models to you want to assign to a different version. - Use the
updateModelApproachAndOrVersion
function and provide these parameter values:
Parameter | Value |
---|---|
model_usecase_asset_id | Asset id of the model use case. It can be fetched from the browser url |
approach_id | 00000000-0000-0000-0000-000000000000 |
version_number | 0.0.0-model.%model_identity_key% Replace model_identity_key with the value from the previous API response. For example, 0.0.0-model.a30593ff-4eec-4241-b445-c2450b4fa6da |
catalog_id | The id of the catalog where the model use case is created. You can fetch the ID from the browser URL. |
Follow these steps to construct the request payload:
-
Prepare to use the API command
getModelUsecaseApproaches
. -
From the request payload, get the ID of the approach that you created earlier for the new model versions. The request payload will look like this:
{ "target_approach_id": "Enter approach id value fetched from previous api response payload", "target_version_number": "Enter version number in version semantic format say x.y.z", "target_version_comment": "Information about the changes gone in this model version" }
-
Execute the API command.
All the tracked models with the specified model identity key are assigned to a new approach with the given version. Repeat the process for each row by providing a new version number.
Learn more
Customizing details for a factsheet (AI Factsheets)
Parent topic: Using AI Factsheets for AI Governance