By using IBM OpenPages with Watson OpenScale, you can create an end-to-end model governance solution. Start by creating a new model in IBM OpenPages MRG. Take the model through the candidate and development workflows in Watson OpenScale. Link the model to a sample model in Watson OpenScale. Explore the Watson OpenScale features, export Watson OpenScale metrics for the model to OpenPages as part of the pre-implementation validation process. Explore the ways to view and interpret these metrics.
Work in IBM OpenPages
Perform the following steps in IBM OpenPages MRG.
Step 1. Set up a New Model in OpenPages
- Go to menu in the upper left of the screen and select Models under Inventory
- Click Add New in the upper right of the screen
-
Complete the following fields:
- Description
- Model Status to “Proposed”
- Model Owner to your account name
- Model Non-Model to “Model”
- Machine Learning Model to “Yes”
- Monitored with OpenScale to “Yes”
- These fields appear after the Machine Learning Model field is set to “Yes”
- For Parent Entity, select the Business Entity with your organization’s name.
- Click Save
Watson OpenScale monitors deployed models. The non-model designation is for regulatory compliance where you want to experiment with data analysis without deployment and reporting requirements.
Step 2. Move the Model through the Candidate Workflow
For the tutorial, the typical workflow rules are relaxed to enable the same user to move the model through the workflows. Typically, different stages of the workflow would require users who are assigned to certain roles such as owner, developer, and head of model review.
- In the model created in Step 1, enter a Candidate Comment and click Save. This field lets the model owner describe why the proposed model is a model and not a non-model.
- Select the Action “Submit Candidate for Confirmation.” In a live workflow, this step sends the candidate model to a reviewer for approval.
- Select the Action “Confirm Assessment”. In a live workflow, a reviewer confirms that the model candidate is a model and the candidate workflow is complete.
Step 3. Move the Model through the Model Development Workflow to the Pre-Implementation Review Stage
- From the Action menu, click Start Model Development.
- Complete the fields in the Model object that are related to the development – they are listed on the right side pane – and save.
- For purposes of this testing, you can enter your user account as the developer.
- Select Action “Assign to Developer”
- Select Action “Submit for Pre Implementation Review”
Work in Watson Studio
In IBM Watson Studio, you create a project and run a Notebook to set up the service, including the following steps:
• Create two 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
After you start Watson Studio (hint: use the IBM Cloud dashboard, find your instance of Watson Studio, and click Get Started) 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 use this project for all your pre-production models.
- You notice that an instance of Cloud Object Storage is indicated. Go ahead and create an instance on IBM Cloud if you haven’t already.
- Click Create.
Step 2. Associate your new project with the Watson Machine Learning instance
Now you need to associate your pre-prod instance of IBM Watson Machine Learning to your project by adding it as an associated service.
- From the MRM – Pre-prod project screen, click the Settings tab.
- In the Associated services pane, click Add service, 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 list, select the Machine Learning-Pre-Prod instance and click Select.
Step 3. Add the sample Notebook to the project
As part of this tutorial, you have access to a Watson Studio Notebook. You 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 Choose file and then, select the OpenScale and OpenPages 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 Create Notebook.
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 New credential.
- 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. h. Repeat the preceding steps for the prod instance in the third code box.
- In the corresponding code box, paste your IBM OpenPages URL, username, and password.
- In the corresponding code box, paste the model_id number from the model that you created in IBM OpenPages.
- To restart the Notebook and clear the output, from the Kernel menu, click Restart & Clear Output.
- Run the Notebook one cell at a time by using the Run option. Ensure that a cell completes before you run 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 you continue to run the Notebook. You completed the tutorial! You used a Notebook to create a pre-prod model. You can check inside Watson Studio, where you will now see the model that is listed as one of the assets. You also deployed this model, which means that you can go to IBM Watson OpenScale to add the model there.
Work in Watson OpenScale
You 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 use the model risk management features on Watson OpenScale. To work with IBM Watson OpenScale, you must already have an IBM Cloud instance and you must provision 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 No thanks.
Ensure that whenever you work inside IBM OpenPages that your profile indicates that you are integrating your work with OpenScale. Also, be sure to select the option Monitored with Watson OpenScale when you create your model record.
Step 2. Connect Watson OpenScale to IBM OpenPages
So that the two services can be fully integrated, you must add your IBM OpenPages URL and authentication credentials to Watson OpenScale.
- From the Watson OpenScale side bar, click the Configure icon.
- Click Integrations and then in the IBM OpenPages tile, click the Edit icon.
- Select the OpenPages location, which is a specific instance of IBM OpenPages either on cloud or on premises.
- Type the URL, username, and password for the IBM OpenPages instance that you use to manage your models and click Save.
.
Step 3. Perform analysis in Watson OpenScale
After you run the setup Notebook, you can both see and compare the sample evaluations in Watson OpenScale by using a downloadable report. The Model Summary Report includes all the quality measures, fairness measures, and drift magnitude.
- From the Insights dashboard, click the model deployment tile.
-
From the Actions list, click one of the following analysis options:
- Past evaluations: Lists all the previous versions of the evaluation.
- Compare: Compare any of the models, but especially versions of the same model, for best performance.
- Download report PDF: Generates the model summary report, which gives you all of the metrics and the explanation for why they were scored the way they were.
- Send to OpenPages now: Sends all the metrics to the OpenPages model record that you associated to the OpenScale model deployment. In OpenPages, the metrics are listed in the graphical flow diagram and are clickable so that you can drill down into each metric.
Work in OpenPages
Perform the following steps in IBM OpenPages MRG.
Review results in IBM OpenPages
After you send metrics to IBM OpenPages, you are able to review the metrics in OpenPages as part of the Pre-Implementation Review. HINT: You can use the Notebook to go directly to the model in OpenPages. Go to the Create an OpenPages Model section (code cell 12) and find the Model Name = <model name>
and OpenPages Model ID = <model ID>
output. Use them to search for your model in OpenPages.
- Find the model in IBM OpenPages by using the model name, such as MOD_0000206.
- Review the metrics from Watson OpenScale by expanding the metrics twistie:
- In addition to a list of metrics, you can view metrics by type in a graphical format by expanding the metrics summary twistie:
- The Associations view provides relationships in the form of a tree:
- The Supporting files and artifacts pane gives you access to all the Watson OpenScale model risk management reports that are run:
Change the model status in IBM OpenPages
As part of the overall model risk governance workflow, the models you create are typically worked on by several different personas or job roles. For example, there might be a data scientist who is the model owner, a model validator, and model reviewer. For the purposes of the tutorial, you act in all of these roles to see how the model can progress from one status to the next.
You must open the model and use the Actions list to set the model status. Use the ID, such as OpenPagesAdministrator that was given to you to be the model owner, validator, and final approver. For the next part of the tutorial, you’ll want the status to be Approved for Deployment.
- In IBM OpenPages, locate the model that you want to promote.
- From the Actions drop-down box, click Approved. If for some reason, you don’t see the Approved option, you might need to move the model through other steps, such as Submit for Pre Implementation Review or Submit for Approval.
Deploy a new model to production in Watson OpenScale
Push the best model to production. Create a production record by importing from a pre-production model. After the model is approved for deployment in IBM OpenPages, you can send the model to production in Watson OpenScale.
- Review the status of the model deployment:
- Return to the sample Notebook and run the cells to send the model to production.
- You can now view the production model deployment tile. In a regular production environment, it initially appears empty until enough data is gathered and time passes for metric calculation to be triggered. For the tutorial, the Notebook adds data and runs the monitors so that you can see the results right away.
Next steps
Use the analysis of fairness to redefine the model, possibly by using a different algorithm. Use Watson OpenScale to compare models by looking at the key metrics in a side-by-side comparison. Use this feature to determine which version of a model is the best one to send to production or which model might need work:
Because of the connection to Watson OpenScale, you can get alerts in IBM OpenPages for items that require attention or missing pieces of information:
You can set up a regular schedule for sending metrics to IBM OpenPages.