IBM offers a model risk management solution with IBM Watson OpenScale that evaluates outcomes from AI Models across its lifecycle and performs model validations.
Setup options
You can use one of the following options to set up your initial environment:
-
Takes just a few minutes to create a workable system with sample data on a publically hosted lite system
-
Enables you to control some of the setup parameters and can be used later for managing your own models
-
Gives you the most control over resources and options
Automated setup
The auto setup option can be run when you launch the service for the very first time.
Prerequisites
To perform model evaluation, you must already have an IBM Cloud instance and you must have provisioned an IBM Watson OpenScale instance.
Steps
-
Launch Watson OpenScale.
- From the IBM Cloud Dashboard, click Services.
- Click Watson OpenScale.
- Click the Launch Application button.
-
When prompted about running automatic setup, click the Auto setup button.
Set up your environment by using a Python notebook
Many of the functions of the auto setup option, can be replicated by running a Python notebook in Watson Studio. Although the results are the same, by choosing to run a notebook, you can gain experience that can more readily be applied to your own data, models, and pre-prod or prod systems.
Prerequisites
Before you begin using the model risk management (MRM) features, you’ll need to set up the following services on IBM Cloud:
- Watson OpenScale, which provides MRM features and metrics
- IBM Watson Machine Learning (2 separate instances, one for pre-prod and one for prod), which provides the engine for creating predictive models. This tutorial shows how to use IBM Watson Machine Learning as model serving engine, but you can also use any other supported ML engine)
- Watson Studio, which provides the ability to run notebooks and secure assets. (This tutorial shows how to use Watson Studio to create the provided sample models, but you can also use any other IDE to build models)
- [Optional] Cloud Object Storage, which gives you a place to store model assets, such as training dat1. For the tutorial, you’ll use an internal database, however, you might want to set up Cloud Object Storage for your own work.
- In addition to the previously mentioned services, you must also have the OpenScale model risk management on IBM Cloud.ipynb notebook file, which you can download from the https://github.com/IBM/watson-openscale-samples GitHub repository.
Steps
Step 1: Create an IBMid and IBM Cloud account
In case you don’t have an IBM Cloud account yet, you’ll need to start by creating one.
- Point your web browser to the following URL: https://cloud.ibm.com/registration
- Follow instructions to create an IBMid and IBM Cloud Account.
Step 2: Add services to your IBM Cloud account
As soon as you have an IBM Cloud account, you can use the dashboard to add the required services. For each service, you can choose the Lite or Free plan. You must have instances for the following services: Watson OpenScale, Watson Studio, and IBM Watson Machine Learning (2 Instances).
- From the Navigation Menu, click Resource list.
- Click the Create resource button.
- Search for each of the required services by entering keywords, such as openscale, studio, or machine learning.
You might not be able to add two Lite plan instances of IBM Watson Machine Learning to your account. Either create the second instance using the IBM Watson Machine Learning Standard plan or create a second IBM Cloud Account that is linked to a separate email address to create the second Watson Machine Machine Learning instance (Link to register the second account: https://cloud.ibm.com/registration).
Step 3: Add a Cloud Object Storage instance
Use Cloud Object Storage to store training dat1. After you create an instance Cloud Object Storage, Watson Studio, IBM Watson Machine Learning, and Watson OpenScale will be able to access the buckets that are created as part of the model creation process.
- Use your primary IBMid to log into your IBM Cloud account.
- From the IBM Cloud Dashboard, click the Add resource button, then click Storage.
- Click the Object Storage tile, select the Lite plan, then click the Create button.
Work in Watson Studio
In IBM Watson Studio, you will create a project and run a notebook to perform most of the set-up tasks, including the following steps:
- create 2 machine models
- connect Watson OpenScale to IBM OpenPages
- create model deployments and configure monitors in Watson OpenScale
Step 1: Create the pre-prod project in Watson Studio
When you first start Watson Studio (hint: use the IBM Cloud dashboard, find your instance of Watson Studio and click the Get Started button) you have the option of taking a tour. Your first task is to create a project to which you associate the IBM Watson Machine Learning instance that you created for your pre-production work.
- Click the Create a project tile.
- Click the Create an empty project tile.
- Give the project a name and description: In the Name field, type
MRM – Pre-prod
. You’ll use this project for all your pre-production models. - You’ll notice that an instance of Cloud Object Storage is required. Go ahead and create an instance of that on IBM Cloud if you haven’t already.
- Click the Create button.
Step 2: Associate your new project with the IBM Watson Machine Learning instance
Now you need to associate your pre-prod instance of Watson Machine Learning to your project. You’ll do this by adding it as an associated service.
- From the MRM – Pre-prod project screen, click the Settings tab.
- In the Associated services pane, click the Add service button, and then click Watson.
- Find the IBM Watson Machine Learning option and click Add.
- From the Machine Learning configuration window, click the Existing tab.
- From the Existing Service Instance drop-down box, select the Machine Learning-Pre-Prod instance and click the Select button.
Step 3: Add the sample notebook to the project
As part of this tutorial, you are given access to a Watson Studio notebook. Use it to set up your connection between Watson OpenScale and IBM OpenPages, to create and deploy pre-prod models, and configure the model deployments in Watson OpenScale.
- From the project page, click the Add to project button.
- Click the Notebook tile.
- Click the From file tab, click the Choose file button and then, select the OpenScale model risk management on IBM Cloud.ipynb notebook file that you can download from the https://github.com/IBM/watson-openscale-samples GitHub repository.
- Add a name and description and click the Create notebook button.
Step 4: Run the sample notebook
The newly created notebook is opened in Watson Studio in the integrated notebook editor. You need to update some of the credentials and then run the notebook to create your pre-prod model.
-
In the corresponding code box, paste your IBM Cloud API key:
- From the IBM Cloud toolbar, click your Account name, such as
<Your user name>
’s Account. - From the Manage menu, click Access (IAM).
- In the navigation bar, click IBM Cloud API keys.
- Click the Create an IBM Cloud API key button.
- Type a name and description and then click Save.
- Copy the newly created API key and paste it into your notebook in the CLOUD_API_KEY code box, which is the first code box.
- From the IBM Cloud toolbar, click your Account name, such as
-
In the corresponding code boxes, paste your credentials from the pre-prod and prod instances of IBM Watson Machine Learning:
- Go to the IBM Cloud dashboard.
- In the Resource summary section, click Services.
- Click Machine Learning-Pre-Prod.
- In the navigation pane, click Service credentials.
- Click the New credential button.
- Copy your credentials by clicking the copy icon.
- Return to the notebook editor and update the credentials by replacing the sample credentials with your own in the second code box.
- Repeat the preceding steps for the prod instance in the third code box.
- To restart the notebook and clear the output, from the Kernel menu, click Restart & Clear Output.
- Run the notebook each cell at a time by using the Run option. Ensure that a cell completes before running the next cell. Be sure to read directions for steps that must be taken during the intervening cells. For example, at one point, you are directed to move your model into production before continuing running the notebook.
Congratulations! You have used a notebook to create a pre-prod model. You can check inside Watson Studio, where you will now see the model listed as one of the assets. You have also already deployed this model, which means that you can go to IBM Watson OpenScale to add the model there.
Work in IBM Watson OpenScale
You’ll use IBM Watson OpenScale to validate and monitor your models and to process metrics. First, you need to do some set up.
Step 1: Activate model risk management features
As part of this tutorial, you can automatically set up the model risk management features on Watson OpenScale. The following sections detail how to activate the features on IBM Cloud:
To work with IBM Watson OpenScale, you must already have an IBM Cloud instance and you must have provisioned an IBM Watson OpenScale instance.
-
Launch Watson OpenScale.
- From the IBM Cloud Dashboard, click Services.
- Click Watson OpenScale
- Click the Launch Application button.
-
When prompted about running automatic setup, click the No thanks button.
Manual setup
You can manually set up your entire Watson OpenScale model risk management service by completing the following steps. To successfully complete the steps, you must have detailed information about your machine learning provider, the database, and the data that is used for monitoring.
Steps
- Provision prerequisite IBM Cloud services. You must set up two instances of IBM Watson Machine Learning.
- Set up Watson Studio projects. You must set up projects for both pre-production and production models.
- Configure Watson OpenScale.
- Next steps: Continue setting up the monitors and data logging.