Pre-work
Before we get started, we will download some assets and complete some setup for our workshop. This section is broken up into the following steps:
1. Download or Clone the Repository
Various parts of this workshop will require the attendee to upload files or run scripts that we've stored in the repository. To download the repository and its assets, you have two options. Option 1, if you have the git
command line interface on your laptop, you can clone the repository directly. Option 2, if you don't have git you can access the GitHub repository page to download the zip file.
[Option 1] If you have the git CLI, run the following commands from a terminal or command prompt:
[Option 2] To download the repository as a zip file, go to the GitHub repo for this workshop and download the archived version of the workshop and extract it on your laptop.

Note: If you used Option 2, make sure you extract or unzip the zip file after it's downloaded. This is not needed if you followed Option 1
2. Create IBM Cloud account and log into IBM Cloud Pak for Data as a Service
Launch a browser and navigate to IBM Cloud Pak for Data as a Service.
Click the
Select Region
button and choose whichever one is closest to you.Then you can log into your IBM Cloud account using your IBMid. If you don't have one, you can click on
Sign up and try for free
to create a free IBM Cloud account.

Some of the services required for IBM Cloud Pak for Data will be provisioned for you. Once you see a message that says that the apps are ready to use, click on
Go to IBM Cloud Pak for Data
.

Go the (☰) navigation menu on the top left corner of the Cloud Pak for Data UI. Expand Services and then click on
Service instances
.

If you see an instance of Watson Machine Learning you are ready to use it, and you can skip to 3. Create a Project and Deployment Space. If you do not have an instance of Watson Machine Learning, click on the
Add service +
button.

Search or scroll until you find the tile for Machine Learning and click on it.

Choose the same region as you chose for your Cloud Pak for Data as a Service platform, select the Free tier unless your organization has already used their 1 free tier, change the name and add tags if you like. The Default resource group should be correct, and then click
Create
.
3. Create a Project and Deployment Space
Create a New Project
In Cloud Pak for Data, we use the concept of a project to collect / organize the resources used to achieve a particular goal (resources to build a solution to a problem). Your project resources can include data, collaborators, and analytic assets like notebooks and models, etc.
Go the (☰) navigation menu, expand Projects and click on the View all projects link.

Click on the
New +
button on the top.

We are going to create a project from an existing file (which contains the assets we will use throughout this workshop), as opposed to creating an empty project. Select the Create a project from a sample or file option.

Click on the browse link and in the file browser popup, navigate to where you cloned or downloaded this repository in the previous section. Then select the
CreditRiskProject.zip
file in theprojects/
folder there.

Give the project a name. You also need to provide an object storage instance for this project. If you haven't already created a Cloud Object Storage instance in your IBM Cloud account, you can create one now by clicking
Add
.

A new tab opens up, where you can create the Cloud Object Service. By default, a
Lite
(Free) plan will be selected. Scroll down and update the name of your Cloud Object Storage service if you wish, and clickCreate
.

The browser tab will automatically close when the Cloud Object Storage instance has been created. Back on IBM Cloud Pak for Data as a Service, click
Refresh
.

The newly created Cloud Object Storage instance will now be displayed under "Storage". Click
Create
to finish creating the project.

You can see a progress bar that says your project is being created. Once the project is succesfully created, on the pop up window click on the
View new project
button.

Clicking on the Assets tab will show all the assets that were imported into the project when it was created.

Associate a Watson Machine Learning Service instance to the project
You will need to associate a Watson Machine Learning service instance to your project in order to run Machine Learning experiments.
Go to the Settings tab of your project and look for the Associated services section. Click on
Add service
and in the menu that opens up, click onWatson
.

Click the checkbox next to the Watson Machine Learning service instance that was created for you when you signed up for Cloud Pak for Data as a Service. Click
Associate service
.
Note: If you have multiple WatsonMachineLearning services, make sure you select the one that is in the same regions as is your Cloud Pak for Data as a service.
Note: Also make sure that the Name of the instance matches the name of the WatsonMachineLearning that you added in the earlier steps

You will see a notification that the WatsonMachineLearning service was successfully associated with your project. Click on the
X
in the right top corner to close the pop up modal and go back to your project.

Create a Deployment Space
Cloud Pak for Data uses the concept of Deployment Spaces
to configure and manage the deployment of a set of related deployable assets. These assets can be data files, machine learning models, etc. For this workshop, we need to create one.
Go the (☰) navigation menu, expand
Deployment spaces
and then selectView all spaces
.

Click on the
New deployment space
button.

We will create an empty deployment space, so click on the
Create an empty space
option.

Give your deployment space a unique name and optional description. Provide the Cloud Object Storage instance that you had created when you were creating the project and select the Machine Learning Service instance associated with your IBM Cloud Pak for Data as a Service instance, then click the
Create
button.

Once the deployment space is created, you can click on
View new space
.

4. Get the IBM Cloud platform API key and Watson Machine Learning service instance location
In some parts of this workshop, you will be executing Jupyter notebooks which use the Watson Machine Learning API to perform operations on your Watson Machine Learning instance. For the Jupyter notebooks to gain access to your Watson Machine Learning instance, you will need to provide them with the API key for your IBM Cloud account as well as the location of the WML service instance.
Get the IBM Cloud platform API key
Use one of the following methods to retrieve the IBM Cloud Platform API key:
1. Using the IBM Cloud CLI
Install the IBM Cloud CLI using the instructions in the link.
Once the IBM Cloud CLI is installed, run the following command in your terminal to log into your IBM Cloud account. Running this command will prompt you to enter your email address and password.
Once you have successfully logged in, generate an API key using the following command. Replace API_KEY_NAME with a unique name.
Get the value of
API Key
from the result of the command. This is the api_key value that you will need to provide in your Jupyter notebooks for accessing the Watson Machine Learning service instance.
2. Using the IBM Cloud console
Alternatively, you can use the IBM Cloud Console to generate the IBM Cloud API key.
Go to the API keys section of the Cloud console.
Select
My IBM Cloud API keys
in the View dropdown and then clickCreate an IBM Cloud API key +
.

Give your API key a unique name and click
Create
. You should see a message that saysAPI key successfully created
. ClickCopy
to copy the generated API key.

This is the api_key value that you will need to provide in your Jupyter notebooks for accessing the Watson Machine Learning service instance.
Get the Watson Machine Learning service instance location
Option 1: You can select the Watson Machine Learning location code from the table below if you are sure where you've deployed your instance.
Region
Region Codes
Dallas
us-south
London
eu-gb
Frankfurt
eu-de
Tokyo
jp-tok
Option 2: Alternatively, if you prefer to use the CLI, you can use the API key to obtain the location of the Watson Machine Learning Service instance associated with your IBM Cloud Pak for Data as a Service instance.
Install the IBM Cloud CLI using the instructions in the link.
Run the following command in a terminal to log into IBM Cloud using the API Key you had generated earlier. Remember to update
API_KEY
with your api key.
Run the following command to retrieve information about the Watson Machine Learning service instance. Remember to update
WML_INSTANCE_NAME
with the name of the Watson Machine Learning instance associated with your IBM Cloud Pak for Data as a Service instance.
Get the value of
Location
from this result. This is the location value that you will need to provide in your Jupyter notebooks for accessing the Watson Machine Learning service instance.
Conclusion
We have now completed creating an IBM Cloud account, a Cloud Pak for Data as a Service instance, and the project and deployment space that we will use in the rest of this workshop. We have also obtained the IBM Cloud API key and the Watson Machine Learning service instance location region code that we will use in the Jupyter notebooks section.
Last updated
Was this helpful?