You download a Machine Learning model to extend a
decision service.
Before you begin
For this task, you must have an IBM Cloud Pak® for Data
account. You download a Machine Learning model from this resource. If you do not have an account, contact your IBM® representative.In your IBM Cloud Pak for Data account, create the following resources:
- Cloud Object Storage
- Watson Machine Learning
- Watson Studio
Note: In IBM Cloud Pak for Data, you must set your region to Dallas(us-south)
for this example.
About this task
This task explains the process for downloading a Machine Learning model. As an example, the task uses the Mortgage Approval Prediction Model, a sample file in IBM Cloud Pak for Data. This model determines the probability of a person getting a loan based on their profile. You run the model in the Miniloan decision service.
Procedure
To download the model:
- Open IBM Cloud Pak for Data
, and set your IBM Cloud® region to Dallas(us-south).
- Open the Navigation Menu
in the top left corner, and click
.
- Click New project.
- Click Sample.
- Click the tile named Evaluate an ML model.
- Click the Create button to create the project with the ML model.
View the import summary and ensure that the project is created successfully.
- Click Mortgage Approval Prediction Model, which is available in
the Asset section.
- Click the Promote to deployment space button to deploy the model.
- Choose an existing deployment space, or name a new one, in the Target
space field.
- From the Navigation Menu
in the top left corner, choose
Deployments.
- Select your deployment space.
- Choose Mortgage Approval Prediction Model.
- Click the New deployment button.
- Give the deployment a name and choose Online as the type.
- Click the Create button.
- Click your deployment in the list.
- On the API reference page, the public and private endpoint of the deployment are
displayed.
- Copy the value of the public endpoint field. You use this value later to make a separate
note of this part of the URL:
https://us-south.ml.cloud.ibm.com/ml/v4/deployments/
30d8221b-47ad-48d1-8b68-2f042474ff91
predictions?version=2021-05-01
Note: The shown endpoint value is an example. You get a different value when you do this
task.
- Note down the deployment ID. In this example, the ID is
30d8221b-47ad-48d1-8b68-2f042474ff91.
- Click your deployment space in the breadcrumbs at the top of the browser window:
Deployments / <your deployment space>.
- Click the arrow button
above
the tray at the top right.
- Choose Export space.
- Click the New export file button.
- Give a name for your export file and select the check box next to Mortgage
Approval Prediction Model.
- Click the Create button.
- From the entry that appears in the table, hover over it and click the
Download button to the right of the entry.
- Open the download directory on your computer and locate the file with the name you chose.
Open the compressed (.zip) file.
- Inside the compressed file, navigate to
assets/.METADATA.
-
Extract the file wml_model in the directory. It contains the details of
your data model. It is not well formatted. To view it, you can use it any JSON formatter of your
choice. It can be left unformatted if you do not want to inspect it.
What to do next
In the next task, you integrate the Machine Learning model into the Miniloan
decision service.