Skip to Content

Prepare your environment for the SAP Leonardo Machine Learning foundation Image Classification Retraining scenario

test
0 %
Prepare your environment for the SAP Leonardo Machine Learning foundation Image Classification Retraining scenario
Details
// Explore More Tutorials

Prepare your environment for the SAP Leonardo Machine Learning foundation Image Classification Retraining scenario

03/22/2019

Discover how to prepare your environment for the SAP Leonardo Machine Learning foundation Image Classification Retraining scenario

You will learn

  • How to connect to Cloud Foundry Command Line Interface to your SAP Cloud Platform for Cloud Foundry account
  • Get Your SAP Leonardo Machine Learning Foundation service instance Key
  • Configure SAP Leonardo Machine Learning Command Line Interface for your SAP Cloud Platform for Cloud Foundry account

Step 1: Login using the SAP Cloud Platform CLI

As described in the Install the Cloud Foundry Command Line Interface (CLI), you should be able to successfully connect to your SAP Cloud Platform for Cloud Foundry trial environment.

Execute the following command:

cf login

Make sure your target API endpoint, organization and space are set to the environment where you previously created your SAP Leonardo Machine Learning foundation service instance.

Log on to answer question
Step 2: Get the Service Key details

When you created the service key for the Machine Learning Foundation service, you were provided with the following details:

  • the retraining API URL (under the IMAGE_RETRAIN_API_URL key)
  • the job submission API URL (under the JOB_SUBMISSION_API_URL key)
  • the authentication URL (under the url key)
  • the client_id & client_secret that allows you to get your OAuth token

In your terminal console, execute the following command:

cf service-key my-ml-foundation my-ml-foundation-key

Provide an answer to the question below then click on Validate.

Paste the IMAGE_RETRAIN_API_URL URL.
×
Step 3: Set the Machine Learning foundation plugin Configuration

Before you can start using the SAP ML CLI, you will need to set a series of configuration setting.

In your terminal console, execute the following command but make sure to update the authentication URL, the job submission API URL, and the retraining API URL first:

cf sapml config set auth_server <authentication URL>
cf sapml config set job_api <JOB_SUBMISSION_API_URL>
cf sapml config set retraining_image_api <IMAGE_RETRAIN_API_URL>
cf sapml config set ml_foundation_service_name  ml-foundation-trial-beta

cf sapml fs init

Note:

When using a productive account the ml_foundation_service_name might be different than the one using in trial. Make sure to adjust the value accordingly.

The output should look like this:

Attempting automatic login using Cloud Foundry service "ml-foundation-trial-beta" ...
Successfully logged in using "ml-foundation-trial-beta".
Initializing. Please wait.
Initialization finished successfully.
Log on to answer question

Next Steps

Back to top