Skip to content

On-premise users: click in-app to access the full platform documentation for your version of DataRobot.

Automated deployment and replacement of Scoring Code in SAP AI Core

Availability information

Automated deployment and replacement of Scoring Code in SAP AI Core is a premium feature, off by default. Contact your DataRobot representative or administrator for information on enabling this feature.

Feature flag: Enable the Automated Deployment and Replacement of Scoring Code in SAP AI Core (Premium feature)

Create a DataRobot-managed SAP AI Core prediction environment to deploy DataRobot Scoring Code in SAP AI Core. With DataRobot management enabled, the external SAP AI Core deployment has access to MLOps features, including automatic Scoring Code replacement.

Service health information for external models and monitoring jobs

Service health information such as latency, throughput, and error rate is unavailable for external, agent-monitored deployments or when predictions are uploaded through a prediction monitoring job.

Create an SAP AI Core prediction environment

To deploy a model in SAP AI Core, you first create a custom SAP AI Core prediction environment:

  1. Open the Console > Prediction environments page and then click + Add prediction environment.

  2. In the Add prediction environment dialog box, configure the prediction environment settings:

    • Enter a descriptive Name and an optional Description of the prediction environment.

    • Select SAP AI Core from the Platform drop-down list.

    • Enable the Managed by DataRobot setting to allow this prediction environment to automatically package and deploy DataRobot Scoring Code models through the Management Agent.

    The Supported model formats settings are automatically set to DataRobot and DataRobot Scoring Code only and can't be changed, as this is the only model format supported by DataRobot managed SAP AI Core. In addition, SAP AI Core prediction environments do not support time series models.

  3. In the Management settings, select the related SAP credentials and SAP resource group.

    SAP Oauth credentials required

    DataRobot management of Scoring Code in SAP AI Core requires existing SAP Credentials. If you don't have existing credentials, the No SAP credentials found alert appears, directing you to Manage credentials to create SAP AI Core credentials.

    To create the required credentials, for Credential type, select SAP OAuth. Then, enter a SAP API URL, Auth URL, Client ID, Client secret, and a Display name. To validate and save the credentials, click Save and sign in.

  4. In the Monitoring settings, click Enable monitoring and optionally, define Environment variables.

  5. After you configure the environment settings, click Add environment.

    The SAP AI Core environment is now available from the Prediction environments page.

Deploy a model to the SAP AI Core prediction environment

Once you've created an SAP AI Core prediction environment, you can deploy a model to it:

  1. On the Registry > Model directory page, in the table of registered models, click the registered model containing the version you want to deploy, opening the list of versions.

    Model support

    SAP AI Core prediction environments do not support time series models or models without Scoring Code support.

  2. From the list of versions, click the Scoring Code enabled version you want to deploy, opening the registered model version panel.

  3. In the upper-right corner of any tab in the registered model version panel, click Deploy.

  4. In the Prediction history and service health settings, under Choose prediction environment, click Change.

  5. In the Select prediction environment panel, click SAP AI Core, and then click the prediction environment you want to deploy to.

  6. With a SAP AI Core environment selected, under SAP resource plan, select a plan based on the anticipated CPU and memory usage of your prediction workloads. For more information on these resource plans, see the SAP AI Core documentation:

  7. (Optional) Open the Advanced environment settings and define additional Environment key-value pairs to provide extra parameters to the SAP AI Core deployment interface.

  8. Configure the remaining deployment settings, and then click Deploy model.

While the deployment is Launching, you can monitor the status events on the deployment's Monitoring > Service health tab under Recent activity > Agent activity

Make predictions in SAP AI Core

After you deploy a model to an SAP AI Core prediction environment, you can use the code snippet from the Predictions > Portable predictions tab to score data.

Prediction request payload limit

The maximum prediction request payload is 1MB (approximately 2000 rows) per request. The provided code snippet splits the prediction payload into multiple requests.

Before you run the code snippet, you must export environment variables containing the secrets associated with the Service Key used SAP AI Core:

Environment variable Description
SAP_AI_API_URL The URL of the SAP AI Core service.
SAP_AI_AUTH_URL The URL used for authentication with SAP AI Core.
SAP_CLIENT_ID The client ID associated with your SAP AI Core Service Key.
SAP_CLIENT_SECRET The client secret associated with your SAP AI Core Service Key.

Note

These are the same fields provided when creating a SAP OAuth credential.

Feature considerations

  • Only Scoring Code JAR-enabled models are supported.

  • Custom models, LLMs, and time series models are not supported.

  • Challenger models and model replacement are not supported (challenger prediction servers can't be set to an external or serverless prediction environment).

  • Batch monitoring is not supported.

  • Only CSV files are supported for predictions. XLSX files are not supported by the code snippet.

  • The maximum prediction request payload is 1MB (approximately 2000 rows) per request. The code snippet splits the prediction payload into multiple requests.


Updated September 6, 2024