Setting up your local environment for using the Watson Machine Learning CLI
You can work with your IBM Watson Machine Learning service using a command line interface on your computer.
Command reference: Watson Machine Learning CLI
Tip If this is the first time you have set up the Watson Machine Learning CLI environment, review key terms.
Before you begin
- Sign up for an IBM Cloud account
See: IBM Cloud registration
- Create an instance of Watson Machine Learning
See: Watson Machine Learning in the IBM Cloud catalog
Perform these steps on your computer:
1. Install the IBM Cloud CLI
Install the IBM Cloud command line interface (CLI) on your computer.
2. Install the machine-learning plugin
From a command line on your computer, install the machine-learning plugin:
ibmcloud plugin install machine-learning
4. Log in and test
4.1 Log in
From a command line on your computer, log in to IBM Cloud:
Tip The login command prompts you to specify your API endpoint. You can look up your Region on your IBM Cloud dashboard, and then select the API endpoint for that region from the prompt.
4.2 Find and set instance
Find and specify your Watson Machine Learning instance. Enter:
ibmcloud ml list instances
This lists all Machine Learning instances available in the region and account that you selected. Note the instance ID and set it with this command:
ibmcloud ml set instance <instance-id>
Run a test Watson Machine Learning command:
ibmcloud ml list training-runs
Fetching the list of training runs ... SI No Name guid status framework version submitted-at 0 records found. OK List all training-runs successful
(Because no training runs have been started, you would not expect to see any runs listed. The most important part of this output is that the command completed successfully.)