migrating from sap leonardo machine learning foundation to

30
PUBLIC Document Version: 3.1.9 – 2021-12-24 Migrating from SAP Leonardo Machine Learning Foundation to SAP Data Intelligence © 2021 SAP SE or an SAP affiliate company. All rights reserved. THE BEST RUN

Upload: others

Post on 11-Jan-2022

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Migrating from SAP Leonardo Machine Learning Foundation to

PUBLICDocument Version: 3.1.9 – 2021-12-24

Migrating from SAP Leonardo Machine Learning Foundation to SAP Data Intelligence

© 2

021 S

AP S

E or

an

SAP affi

liate

com

pany

. All r

ight

s re

serv

ed.

THE BEST RUN

Page 2: Migrating from SAP Leonardo Machine Learning Foundation to

Content

1 About This Guide. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2 Migrating to SAP Data Intelligence. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4

3 Bring Your Own Model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63.1 Before You Start. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73.2 Get the Model List. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83.3 Export Your Machine Learning Models. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93.4 Namespaces and Tenants. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103.5 Import Your ML Models to the Data Lake. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

Uploading Files Larger Than 100 MB. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123.6 Create a Machine Learning Scenario. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133.7 Register the Model Artifacts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143.8 Create an Inference Pipeline. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163.9 Send an Inference Request to the Pipeline. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

4 Migrating Your Training Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .194.1 Before You Start. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204.2 Get the MinIO Storage Endpoint. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .204.3 Download Your Data from the MinIO Client. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .214.4 Add Your Training Data to the Data Lake. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

Import Your Data to the Data Lake. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22Read Data Using a Data Ingestion Pipeline. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

2 PUBLICMigrating from SAP Leonardo Machine Learning Foundation to SAP Data Intelligence

Content

Page 3: Migrating from SAP Leonardo Machine Learning Foundation to

1 About This Guide

This guide describes how you can migrate your machine learning (ML) workloads and data from SAP Leonardo Machine Learning Foundation to SAP Data Intelligence. The guide explains the artifacts (models and datasets) in a machine learning scenario and how they can be migrated to SAP Data Intelligence.

Migrating from SAP Leonardo Machine Learning Foundation to SAP Data IntelligenceAbout This Guide PUBLIC 3

Page 4: Migrating from SAP Leonardo Machine Learning Foundation to

2 Migrating to SAP Data Intelligence

In this section, we'll look at what you need to consider when migrating from SAP Leonardo Machine Learning Foundation to SAP Data Intelligence.

Overview and Availability of SAP Data Intelligence

SAP Data Intelligence takes powerful data management capabilities for data governance, orchestration, monitoring, pipelining, and processing and combines them with intelligent machine learning capabilities that cover all stages of the data science workflow.

Considerations

When you migrate from SAP Leonardo Machine Learning Foundation to SAP Data Intelligence, consider the following:

● Do you use any machine learning models that are provided by SAP, such as “Image Classification” or “Text Classification”?

● What type of models do you currently run in SAP Leonardo Machine Learning Foundation?● Do you currently use any “Bring Your Own Model” or “Train Your Own Model” models?● What training data do you currently use and where is it stored?● Which release and version of SAP Data Intelligence do you plan to migrate to?

GRPC Endpoints

In SAP Data Intelligence, support to gRPC is currently under development. Model deployment in SAP Data Intelligence exposes an HTTP/REST endpoint for inference requests. The inference endpoint accepts JSON data (inference request) in the message body. The JSON format is based on the TensorFlow Predict API Request Format. After you have migrated to SAP Data Intelligence, you will need to use a REST/HTTP client to communicate with the inference endpoints.

Model Metadata

The model repository (a REST API) in SAP Leonardo Machine Learning Foundation supports metadata for the models. SAP Data Intelligence provides a built-in data lake, which is the model store for “Bring Your Own Model”. You can upload your model to the data lake and register it in a machine learning scenario. Metadata is not supported by the upload or registration of the model artifact, although support is planned for a future

4 PUBLICMigrating from SAP Leonardo Machine Learning Foundation to SAP Data Intelligence

Migrating to SAP Data Intelligence

Page 5: Migrating from SAP Leonardo Machine Learning Foundation to

release. After you have migrated to SAP Data Intelligence, you need to create a metadata file within the model archive

Retrained Models

The model retraining capability of functional services in SAP Leonardo Machine Learning Foundation is not available in SAP Data Intelligence. SAP Data Intelligence comes with pretrained functional services. However, you can migrate your retrained models to SAP Data Intelligence and use them in your own inference pipelines.

Feature Comparison

ML Capabilities MLF DI

Model Store Model Repository API DI Data Lake

TensorFlow Serving 1.11 ✔ ✔

Multi-model serving ✔ Planned for DI:2004

gRPC model server endpoint ✔ Planned for Q2 2020

TensorFlow Serving 1.3, 1.7, 1.8 ✔ ✔ ml.serving runtime

Retrain functional services ✔ ✘ Pretrained functional services

Related Information

SAP Machine Learning FoundationRepository Objects Reference for SAP Data IntelligenceSAP Machine Learning Core Operators

Migrating from SAP Leonardo Machine Learning Foundation to SAP Data IntelligenceMigrating to SAP Data Intelligence PUBLIC 5

Page 6: Migrating from SAP Leonardo Machine Learning Foundation to

3 Bring Your Own Model

If you use a “Bring Your Own Model” scenario (BYOM) in SAP Leonardo Machine Learning Foundation, you can migrate your scenarios to SAP Data Intelligence as described here.

BYOM provides a set of REST APIs to facilitate model deployment. It deals primarily with two services:

● The “Model Repository” service, which provides a set of REST APIs to facilitate the model repository operations. This service allows you to create new model versions along with your metadata, where versioning is enabled automatically. You can use this service to manage the lifecycle of your models.

● The “Model Deployment” service, which provides a set of REST APIs to facilitate model deployment operations. You can host your trained models in the Model Repository and deploy them using Model Deployment to serve predictions.

BYOM Migration Scenarios

The migration scenarios for BYOM are shown in the table below.

Scenario Description

Model Repository Migration of machine learning models that are uploaded di­rectly or that result from training

Model Deployment Migration of model servers that serve gRPC and HTTP end­points for inference

Retrained models using the retrainable services API Retrained machine learning models using the ML service APIs for scenarios such as Image Classification, Object De­tection, and so on.

Objectives

In this chapter, we'll explain the following:

● How to export your machine learning models from SAP Leonardo Machine Learning Foundation● The notion of tenants for your migration● How to upload the exported machine learning models (from your local system or server) to the data lake in

SAP Data Intelligence● How to create a machine learning scenario for SAP Leonardo Machine Learning Foundation● How to register the artifacts stored in the data lake in your ML scenario● How to deploy the ML models using inference pipelines

6 PUBLICMigrating from SAP Leonardo Machine Learning Foundation to SAP Data Intelligence

Bring Your Own Model

Page 7: Migrating from SAP Leonardo Machine Learning Foundation to

Overall Migration Process

To migrate your machine learning models, you need to complete the following steps:

1. Before You Start [page 7]2. Get the Model List [page 8]

You can get the list of machine learning (ML) models by submitting a GET request to the endpoint /api/v2/models.

3. Export Your Machine Learning Models [page 9]You can download a model from SAP Leonardo Machine Learning Foundation using the model repository service. The model repository service provides a set of REST APIs that help you to carry out operations on the model repository.

4. Namespaces and Tenants [page 10]5. Import Your ML Models to the Data Lake [page 10]6. Create a Machine Learning Scenario [page 13]

You can create a machine learning (ML) scenario to capture all of the models that you are migrating from SAP Leonardo Machine Learning Foundation.

7. Register the Model Artifacts [page 14]8. Create an Inference Pipeline [page 16]

You create an inference pipeline in ML Scenario Manager so that you can deploy your machine learning models.

9. Send an Inference Request to the Pipeline [page 17]After you have created and deployed your inference pipeline, you need to send an inference request to it.

Related Information

Artifact ProducerML Scenario Manager

3.1 Before You Start

Before you start, make sure that you have met the following prerequisites:

● You have connected to SAP Leonardo Machine Learning Foundation as described at Connecting to SAP Leonardo Machine Learning Foundation.

● You have generated an access token for SAP Leonardo Machine Learning Foundation as described at Generating Access Token.

● You have administrator authorization in SAP Data Intelligence.● You are familiar with the ML Scenario Manager in SAP Data Intelligence (see ML Scenario Manager).

Migrating from SAP Leonardo Machine Learning Foundation to SAP Data IntelligenceBring Your Own Model PUBLIC 7

Page 8: Migrating from SAP Leonardo Machine Learning Foundation to

Parent topic: Bring Your Own Model [page 6]

Next task: Get the Model List [page 8]

3.2 Get the Model List

You can get the list of machine learning (ML) models by submitting a GET request to the endpoint /api/v2/models.

Procedure

Submit your request using cURL as follows:

#!/bin/bash export MODEL_REPO_URL=https://mlftrial-model-api.cfapps.eu10.hana.ondemand.com export TOKEN="Bearer <REPLACE IT WITH JWT TOKEN>" curl --request GET \ --url $MODEL_REPO_URL/api/v2/models?$expand=true \ --header "authorization: $TOKEN"

As the response, the server returns a list of ML models in JSON format:

{ "count": 2, "models": [ { "name": "object-detection-v2", "versions": [ { "namespace": "b31278df-e0a8-4d0b-9043-14397f0a462c", "modelName": "object-detection-v2", "version": "1", "metaData": {}, "checkSum": null, "createdAt": "2019-12-04T03:03:28.599Z", "updatedAt": "2019-12-04T03:03:38.304Z", "fileName": "object-detection-v2.zip" } ] }, { "name": "inception9", "versions": [ { "namespace": "b31278df-e0a8-4d0b-9043-14397f0a462c", "modelName": "inception9", "version": "1", "metaData": {}, "checkSum": null, "createdAt": "2019-12-24T03:16:26.940Z", "updatedAt": "2019-12-24T03:16:38.825Z", "fileName": "inception.zip" } ] }]

8 PUBLICMigrating from SAP Leonardo Machine Learning Foundation to SAP Data Intelligence

Bring Your Own Model

Page 9: Migrating from SAP Leonardo Machine Learning Foundation to

}

Task overview: Bring Your Own Model [page 6]

Previous: Before You Start [page 7]

Next task: Export Your Machine Learning Models [page 9]

3.3 Export Your Machine Learning Models

You can download a model from SAP Leonardo Machine Learning Foundation using the model repository service. The model repository service provides a set of REST APIs that help you to carry out operations on the model repository.

Procedure

1. Download your model by submitting a GET request to endpoint /api/v2/models/{modelName}/versions/{version}/format:raw.

2. Repeat for all of the ML models that you want to migrate.

Example

The following cURL request downloads the Image Classifier model, version 1, to the current directory.

#!/bin/bash export MODEL_REPO_URL=https://mlftrial-model-api.cfapps.eu10.hana.ondemand.com export TOKEN="Bearer <REPLACE WITH JWT TOKEN>" export MODEL_FILE="<REPLACE WITH MODEL FILE PATH>" curl --request GET \ --url $MODEL_REPO_URL/api/v2/models/imageclassifier/versions/1/format:raw \ --header "authorization: Bearer $TOKEN" \ --output $MODEL_FILE

Task overview: Bring Your Own Model [page 6]

Previous task: Get the Model List [page 8]

Next: Namespaces and Tenants [page 10]

Migrating from SAP Leonardo Machine Learning Foundation to SAP Data IntelligenceBring Your Own Model PUBLIC 9

Page 10: Migrating from SAP Leonardo Machine Learning Foundation to

3.4 Namespaces and Tenants

SAP Leonardo Machine Learning Foundation supports a “soft-tenancy” concept using the “namespace” field in “Bring Your Own Model” APIs. If you haven't specified a namespace, the default namespace (that is, the identity zone of the subaccount) is used. In contrast, SAP Data Intelligence supports multi-tenancy using the concept of tenants, which are created using the tenant service plan of the SAP Data Intelligence service.

If you want to continue to use the soft-tenancy approach, you can import your machine learning models to the default tenant in SAP Data Intelligence. However, we recommend that you create one tenant in SAP Data Intelligence for each of the namespaces used in SAP Leonardo Machine Learning Foundation, and that you import your machine learning models to the data lake of the respective tenant.

Parent topic: Bring Your Own Model [page 6]

Previous task: Export Your Machine Learning Models [page 9]

Next task: Import Your ML Models to the Data Lake [page 10]

3.5 Import Your ML Models to the Data Lake

Context

After you have exported your machine learning models from SAP Leonardo Machine Learning Foundation, you must upload them to the data lake in SAP Data Intelligence.

NoteBy default, files that you upload to the data lake cannot exceed 100 MB. If you need to upload models that are larger than this, see Uploading Files Larger Than 100 MB [page 12].

Procedure

1. On the launchpad of SAP Data Intelligence, open the Metadata Explorer app and click Browse Connections.2. Select DI_DATA_LAKE to connect to the SAP Data Intelligence data lake.3. Select a path such as /shared/sap/di/ml/ and create a folder, for example, “models”.

4. Click (Upload Files) and select the models that you exported in Export Your Machine Learning Models [page 9].

10 PUBLICMigrating from SAP Leonardo Machine Learning Foundation to SAP Data Intelligence

Bring Your Own Model

Page 11: Migrating from SAP Leonardo Machine Learning Foundation to

5. Click Upload to add the models to the data lake.

6. Click to copy the path to the clipboard.

Results

You have imported your machine learning models to the data lake can you can now use them in your machine learning scenarios.

Task overview: Bring Your Own Model [page 6]

Previous: Namespaces and Tenants [page 10]

Migrating from SAP Leonardo Machine Learning Foundation to SAP Data IntelligenceBring Your Own Model PUBLIC 11

Page 12: Migrating from SAP Leonardo Machine Learning Foundation to

Next task: Create a Machine Learning Scenario [page 13]

Related Information

Uploading Files Larger Than 100 MB [page 12]

3.5.1 Uploading Files Larger Than 100 MB

If you need to upload files that exceed the default size limit of 100 MB, you can change the limit in the System Management app.

Procedure

1. On the launchpad of SAP Data Intelligence, open the System Management app and click (View Application Configuration And Secrets).

2. Switch to change mode, increase the value for the property Applications size limit on the files that can be uploaded, and click Update.

3. Return to the Applications page, locate the application datahub-app-data, and click .

12 PUBLICMigrating from SAP Leonardo Machine Learning Foundation to SAP Data Intelligence

Bring Your Own Model

Page 13: Migrating from SAP Leonardo Machine Learning Foundation to

Results

You can now use the Metadata Explorer to upload files below the size limit that you specified in step 2 [page 12].

Related Information

3.6 Create a Machine Learning Scenario

You can create a machine learning (ML) scenario to capture all of the models that you are migrating from SAP Leonardo Machine Learning Foundation.

Procedure

1. On the launchpad of SAP Data Intelligence, open ML Scenario Manager and click (Create).2. Enter a name for your scenario.3. Optional: In the Business Question field, enter a description such as Scenario to migrate ML

Foundation BYOM to SAP Data Intelligence.

4. Click Create.

Migrating from SAP Leonardo Machine Learning Foundation to SAP Data IntelligenceBring Your Own Model PUBLIC 13

Page 14: Migrating from SAP Leonardo Machine Learning Foundation to

Results

The details for your scenario appear and your scenario is added to the list of ML scenarios on the overview page.

Task overview: Bring Your Own Model [page 6]

Previous task: Import Your ML Models to the Data Lake [page 10]

Next task: Register the Model Artifacts [page 14]

3.7 Register the Model Artifacts

Procedure

To register the model artifacts for your migration scenario, proceed as follows:1. Open the scenario that you created under Create a Machine Learning Scenario [page 13]

2. Click the Models tab and then click (Register).3. Register the model by entering the model artifact name and a description.4. Enter the model URL using the path that you specified in step 3 [page 10] of Import Your ML Models to the

Data Lake [page 10], for example, /shared/sap/di/ml/models/inception.zip.

5. Click Register to register your model artifact.

14 PUBLICMigrating from SAP Leonardo Machine Learning Foundation to SAP Data Intelligence

Bring Your Own Model

Page 15: Migrating from SAP Leonardo Machine Learning Foundation to

Results

Your models are registered in your machine learning scenario, where they can be used to deploy the model as part of an inference pipeline.

Task overview: Bring Your Own Model [page 6]

Previous task: Create a Machine Learning Scenario [page 13]

Next task: Create an Inference Pipeline [page 16]

Migrating from SAP Leonardo Machine Learning Foundation to SAP Data IntelligenceBring Your Own Model PUBLIC 15

Page 16: Migrating from SAP Leonardo Machine Learning Foundation to

3.8 Create an Inference PipelineYou create an inference pipeline in ML Scenario Manager so that you can deploy your machine learning models.

Procedure

1. Open the scenario that you created under Create a Machine Learning Scenario [page 13]

2. Click the Pipelines tab and then click to create an inference pipeline.3. Enter a name and description for your inference pipeline and select TensorFlow Serving Pipeline as the

template.

The pipeline opens automatically in the Modeler.4. Right-click the Model Serving Operator and select Open Configuration.

a. Enter the model runtime based on the TensorFlow runtime.b. Select the resource plan for the model server.c. Enter the number of replicas of the model server to serve the ML model.

5. Save the inference pipeline and return to ML Scenario Manager.6. Create a new scenario version by choosing Create Version.

7. Select the inference pipeline and click (Deploy).8. Enter the necessary configuration details and select the registered ML model from the dropdown in the

Pipeline Parameters step.

16 PUBLICMigrating from SAP Leonardo Machine Learning Foundation to SAP Data Intelligence

Bring Your Own Model

Page 17: Migrating from SAP Leonardo Machine Learning Foundation to

Results

Your inference pipeline is created in your ML scenario and deployed using the ML model. Deployed inference pipelines provide an endpoint that you can subsequently use for model inference.

Task overview: Bring Your Own Model [page 6]

Previous task: Register the Model Artifacts [page 14]

Next task: Send an Inference Request to the Pipeline [page 17]

3.9 Send an Inference Request to the Pipeline

After you have created and deployed your inference pipeline, you need to send an inference request to it.

Procedure

1. Open the scenario that you created under Create a Machine Learning Scenario [page 13]2. Click the Deployments tab and then click the deployed inference pipeline.3. Observe the progress flow and wait until the deployment is successful.

A deployment URL is generated for your inference pipeline.4. Send an inference request to the deployment URL endpoint.

Refer to the API specifications for your model.

RememberProvide SAP Data Intelligence with the bearer access token along with the inference request.

Migrating from SAP Leonardo Machine Learning Foundation to SAP Data IntelligenceBring Your Own Model PUBLIC 17

Page 18: Migrating from SAP Leonardo Machine Learning Foundation to

cURL request:

cURL response:

Next Steps

Repeat from chapter Register the Model Artifacts [page 14] for all of the ML models that you are migrating.

Task overview: Bring Your Own Model [page 6]

Previous task: Create an Inference Pipeline [page 16]

18 PUBLICMigrating from SAP Leonardo Machine Learning Foundation to SAP Data Intelligence

Bring Your Own Model

Page 19: Migrating from SAP Leonardo Machine Learning Foundation to

4 Migrating Your Training Data

If you use your own data to train models that are provided by SAP, you must migrate your data to SAP Data Intelligence. In this section, we'll discuss how you can migrate your data based on its type and location.

SAP Leonardo Machine Learning Foundation provides REST APIs that you can call to start a training job. In SAP Data Intelligence, models can be trained in one of two ways:

● By using the Training operator in a pipeline● By using the software development kit (SDK) to trigger a training job (for details, see Python SDK)

SAP Data Intelligence provides a data lake to store artifacts. You can use this data lake to store the data that you currently use in SAP Leonardo Machine Learning Foundation. Because the foundation uses AWS S3 buckets for storage, these buckets are the source of the data to be moved to SAP Data Intelligence.

Objectives

In this chapter, we'll explain the following:

● How to download your training data from the mlf MinIO endpoint and upload it to the data lake in SAP Data Intelligence

● How to create an S3 connection with the MinIO endpoint configuration and a data ingestion pipeline to read data from the S3 connection and store it in the data lake

Overall Migration Process

To migrate your training data, you need to complete the following steps:

1. Before You Start [page 20]2. Get the MinIO Storage Endpoint [page 20]

You can get the storage endpoint by submitting a GET request to the endpoint /api/v2/storage using the Job Submission API.

3. Download Your Data from the MinIO Client [page 21]4. Add Your Training Data to the Data Lake [page 22]

Related Information

Migrating from SAP Leonardo Machine Learning Foundation to SAP Data IntelligenceMigrating Your Training Data PUBLIC 19

Page 20: Migrating from SAP Leonardo Machine Learning Foundation to

4.1 Before You Start

Before you start, make sure that you have met the following prerequisites:

● You have connected to SAP Leonardo Machine Learning Foundation as described at Connecting to SAP Leonardo Machine Learning Foundation.

● You have generated an access token for SAP Leonardo Machine Learning Foundation as described at Generating Access Token.

● You have administrator authorization in SAP Data Intelligence.● You are familiar with the ML Scenario Manager in SAP Data Intelligence (see ML Scenario Manager).

Parent topic: Migrating Your Training Data [page 19]

Next task: Get the MinIO Storage Endpoint [page 20]

4.2 Get the MinIO Storage Endpoint

You can get the storage endpoint by submitting a GET request to the endpoint /api/v2/storage using the Job Submission API.

Procedure

Submit your request using cURL as follows:

export JOB_SUBMISSION_URL=https://training.integration.eu-central-1.mlf-aws-dev.com export TOKEN="Bearer <REPLACE IT WITH JWT TOKEN>" curl --request GET \ --url $JOB_SUBMISSION_URL/api/v2/storage\ --header "authorization: $TOKEN"

As the response, the server returns a list of ML models in JSON format:

{ "accessKey": "9ZqzbKVqwnI", "endpoint": "93ab75bf.files.integration.eu-central-1.mlf-aws-dev.com", "message": "The endpoint is ready to use.", "secretKey": "heWkzgba0Vbi2qm", "status": "READY"}

Task overview: Migrating Your Training Data [page 19]

Previous: Before You Start [page 20]

20 PUBLICMigrating from SAP Leonardo Machine Learning Foundation to SAP Data Intelligence

Migrating Your Training Data

Page 21: Migrating from SAP Leonardo Machine Learning Foundation to

Next task: Download Your Data from the MinIO Client [page 21]

4.3 Download Your Data from the MinIO Client

Context

MinIO client is a command line tool that you can use to communicate with S3-compatible services. It enables you to copy, delete, and list the files in your remote file system.

Procedure

1. Download and install the MinIO client as described in the MinIO Client Quickstart Guide .2. Configure the MinIO client with you the storage endpoint for your training data, access key, and secret key.

You can do using the command mc config host add <hostname> 'https://<endpoint>' '<accessKey>' '<secretKey>'.

Examplemc config host add my_storage_minio_endpoint 'https://93ab75bf.files.integration.eu-central-1.mlf-aws-dev.com' '9ZqzbKVqwnI' 'heWkzgba0Vbi2qm'

3. Use the command mc ls <hostname> to list the files that are available in the remote file system.

Examplemc ls my_storage_minio_endpoint

4. Download the files using the command mc cp <hostname>/path_to_the_file <local_dir_path>.

Examplemc cp my_storage_minio_endpoint/data/movies.csv .

Task overview: Migrating Your Training Data [page 19]

Previous task: Get the MinIO Storage Endpoint [page 20]

Next: Add Your Training Data to the Data Lake [page 22]

Migrating from SAP Leonardo Machine Learning Foundation to SAP Data IntelligenceMigrating Your Training Data PUBLIC 21

Page 22: Migrating from SAP Leonardo Machine Learning Foundation to

4.4 Add Your Training Data to the Data Lake

You can add your training data to the data lake in one of two ways:

● You can create a folder in the Metadata Explorer in SAP Data Intelligence and upload the training data directly. For more information, see Import Your Data to the Data Lake [page 22].

● You can create a S3 connection with the MinIO endpoint and use a data ingestion pipeline to read your training data from the S3 connection to the data lake. For more information, see Read Data Using a Data Ingestion Pipeline [page 24].

Parent topic: Migrating Your Training Data [page 19]

Previous task: Download Your Data from the MinIO Client [page 21]

Related Information

Import Your Data to the Data Lake [page 22]Read Data Using a Data Ingestion Pipeline [page 24]

4.4.1 Import Your Data to the Data Lake

Context

After you have exported your training data from the MinIO client, you must upload it to the data lake in SAP Data Intelligence.

NoteBy default, files that you upload to the data lake cannot exceed 100 MB. If you need to upload models that are larger than this, see Uploading Files Larger Than 100 MB [page 12].

Procedure

1. On the launchpad of SAP Data Intelligence, open the Metadata Explorer app and click Browse Connections.2. Select DI_DATA_LAKE to connect to the SAP Data Intelligence data lake.

22 PUBLICMigrating from SAP Leonardo Machine Learning Foundation to SAP Data Intelligence

Migrating Your Training Data

Page 23: Migrating from SAP Leonardo Machine Learning Foundation to

3. Select a path such as /shared/sap/di/ml/ and create a folder, for example, “trainingdata”.

4. Click (Upload Files) and select the data that you downloaded in Download Your Data from the MinIO Client [page 21].

5. Click Upload to add your data to the data lake.

6. Click to copy the path to the clipboard.

Next Steps

After you have imported your data to the data lake, create and run a training pipeline using the Training operator. For more information, see Training with ML.

Related Information

Uploading Files Larger Than 100 MB [page 23]

4.4.1.1 Uploading Files Larger Than 100 MBIf you need to upload files that exceed the default size limit of 100 MB, you can change the limit in the System Management app.

Procedure

1. On the launchpad of SAP Data Intelligence, open the System Management app and click (View Application Configuration And Secrets).

2. Switch to change mode, increase the value for the property Applications size limit on the files that can be uploaded, and click Update.

Migrating from SAP Leonardo Machine Learning Foundation to SAP Data IntelligenceMigrating Your Training Data PUBLIC 23

Page 24: Migrating from SAP Leonardo Machine Learning Foundation to

3. Return to the Applications page, locate the application datahub-app-data, and click .

Results

You can now use the Metadata Explorer to upload files below the size limit that you specified in step 2 [page 12].

Related Information

4.4.2 Read Data Using a Data Ingestion Pipeline

Procedure

1. On the launchpad of SAP Data Intelligence, open the Connection Management app and create an S3 connection using the MinIO endpoint and your credentials.

24 PUBLICMigrating from SAP Leonardo Machine Learning Foundation to SAP Data Intelligence

Migrating Your Training Data

Page 25: Migrating from SAP Leonardo Machine Learning Foundation to

2. In the Modeler app, create a simple data ingestion pipeline to copy the data.

Here, we'll use the sample file data/c848a4f8-3d82-11ea-8edf-fa163e8b4377/toxic-comments-2k.zip.

a. Add the Read File operator and open the configuration settings.b. Change the service to S3, set the connection ID to the value from step 1 [page 24], and set the

appropriate bucket from S3 (in our example, data).

c. Enter the path to the file that you want to migrate. In our example, this is c848a4f8-3d82-11ea-8edf-fa163e8b4377/toxic-comments-2k.zip.

Migrating from SAP Leonardo Machine Learning Foundation to SAP Data IntelligenceMigrating Your Training Data PUBLIC 25

Page 26: Migrating from SAP Leonardo Machine Learning Foundation to

d. Add the Write File operator and open the configuration settings.e. Set the service to SDL and enter the path to the target folder in the data lake.

3. Run the pipeline.

Results

The training data is read via the S3 connection and uploaded to the target folder in the Metadata Explorer in SAP Data Intelligence.

26 PUBLICMigrating from SAP Leonardo Machine Learning Foundation to SAP Data Intelligence

Migrating Your Training Data

Page 27: Migrating from SAP Leonardo Machine Learning Foundation to

Next Steps

After you have imported your data to the data lake, create and run a training pipeline using the Training operator. For more information, see Training with ML.

Migrating from SAP Leonardo Machine Learning Foundation to SAP Data IntelligenceMigrating Your Training Data PUBLIC 27

Page 28: Migrating from SAP Leonardo Machine Learning Foundation to

Important Disclaimers and Legal Information

HyperlinksSome links are classified by an icon and/or a mouseover text. These links provide additional information.About the icons:

● Links with the icon : You are entering a Web site that is not hosted by SAP. By using such links, you agree (unless expressly stated otherwise in your agreements with SAP) to this:

● The content of the linked-to site is not SAP documentation. You may not infer any product claims against SAP based on this information.● SAP does not agree or disagree with the content on the linked-to site, nor does SAP warrant the availability and correctness. SAP shall not be liable for any

damages caused by the use of such content unless damages have been caused by SAP's gross negligence or willful misconduct.

● Links with the icon : You are leaving the documentation for that particular SAP product or service and are entering a SAP-hosted Web site. By using such links, you agree that (unless expressly stated otherwise in your agreements with SAP) you may not infer any product claims against SAP based on this information.

Videos Hosted on External PlatformsSome videos may point to third-party video hosting platforms. SAP cannot guarantee the future availability of videos stored on these platforms. Furthermore, any advertisements or other content hosted on these platforms (for example, suggested videos or by navigating to other videos hosted on the same site), are not within the control or responsibility of SAP.

Beta and Other Experimental FeaturesExperimental features are not part of the officially delivered scope that SAP guarantees for future releases. This means that experimental features may be changed by SAP at any time for any reason without notice. Experimental features are not for productive use. You may not demonstrate, test, examine, evaluate or otherwise use the experimental features in a live operating environment or with data that has not been sufficiently backed up.The purpose of experimental features is to get feedback early on, allowing customers and partners to influence the future product accordingly. By providing your feedback (e.g. in the SAP Community), you accept that intellectual property rights of the contributions or derivative works shall remain the exclusive property of SAP.

Example CodeAny software coding and/or code snippets are examples. They are not for productive use. The example code is only intended to better explain and visualize the syntax and phrasing rules. SAP does not warrant the correctness and completeness of the example code. SAP shall not be liable for errors or damages caused by the use of example code unless damages have been caused by SAP's gross negligence or willful misconduct.

Bias-Free LanguageSAP supports a culture of diversity and inclusion. Whenever possible, we use unbiased language in our documentation to refer to people of all cultures, ethnicities, genders, and abilities.

28 PUBLICMigrating from SAP Leonardo Machine Learning Foundation to SAP Data Intelligence

Important Disclaimers and Legal Information

Page 29: Migrating from SAP Leonardo Machine Learning Foundation to

Migrating from SAP Leonardo Machine Learning Foundation to SAP Data IntelligenceImportant Disclaimers and Legal Information PUBLIC 29

Page 30: Migrating from SAP Leonardo Machine Learning Foundation to

www.sap.com/contactsap

© 2021 SAP SE or an SAP affiliate company. All rights reserved.

No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP SE or an SAP affiliate company. The information contained herein may be changed without prior notice.

Some software products marketed by SAP SE and its distributors contain proprietary software components of other software vendors. National product specifications may vary.

These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or warranty of any kind, and SAP or its affiliated companies shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP or SAP affiliate company products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.

SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE (or an SAP affiliate company) in Germany and other countries. All other product and service names mentioned are the trademarks of their respective companies.

Please see https://www.sap.com/about/legal/trademark.html for additional trademark information and notices.

THE BEST RUN