0 / 0
Creating batch deployments

Creating batch deployments

Create a batch deployment to process input data from a file, data connection, or connected data in a storage bucket, and write the output to a selected destination.

Creating a batch deployment

Unlike an online deployment, where data is submitted directly to the endpoint URL for real-time scoring or processing, a batch deployment provides more control over the scoring process. Follow this sequence to create a batch deployment job:

  1. Organize your resources in a deployment space. You can promote or add the deployable asset, and optionally add data files or data connections for scoring the deployment.
  2. When you deploy the asset, such as a machine learning model, you choose Batch as the deployment type.
  3. Create and configure a batch deployment job. You must specify the input data for the deployment, location for writing the output, details for running the job on a schedule or on demand. You can also configure optional settings such as hardware configuration details or options for notification.
  4. Running the job submits the input data to the deployment endpoint, and writes the output to the output file. You can view or download the output from the Assets page of the space after the job completes successfully.

Deployable asset types for batch deployments

You can create batch deployments for these types of assets:

Restriction:

You cannot deploy R Shiny application assets on Cloud Pak for Data as a Service.

Ways to create a batch deployment

You can create a batch deployment in one of these ways:

Creating a batch deployment from the user interface

Follow these steps to create and test a batch deployment.

Before you begin

You must set up your task credentials by generating an API key. For more information, see Managing task credentials.

Creating a batch deployment

Follow these steps to create your batch deployment from a deployment space:

  1. From the Assets tab in your deployment space, click the name of the model that you want to deploy.

  2. Click New deployment.

  3. Choose Batch as the deployment type.

  4. Enter a name and an optional description for your deployment.

  5. Select a hardware specification.

    Restriction:

    You cannot create or select custom hardware specifications from the user interface in a deployment space. To learn more about ways to create and select a hardware specification, see Managing hardware specifications for deployments.

  6. Click Create. When status changes to Deployed, your deployment is created.

Testing a batch deployment

To test a batch deployment from your deployment space, you must create a batch job to submit data for processing.

  1. Click New job to create a batch job for the deployed asset.
  2. Follow the prompts to define the job, specifying input data, and details for running the job.
  3. Save and run the job manually or on a specified schedule.

To learn more about creating, running, and managing jobs, see Creating jobs in a deployment space.

Test a batch deployment by creating a batch job

Retrieving the endpoint for a batch deployment

You must retrieve the endpoint URL to access your batch deployment from your applications. Follow these steps to get the endpoint URL for your batch deployment:

  1. From your deployment space, click the name of your batch deployment.
  2. From the deployment details page, click the name of your batch job.
Note:

If you don't have an existing batch job for your batch deployment, you must create one. For more information, see Creating jobs in a deployment space.

  1. From the batch job details page, you can access the endpoint URL for your batch deployment. Click the copy Copy to clipboard icon icon to copy the endpoint URL to your clipboard.

Retrieve endpoint URL for batch deployment

Accessing batch deployment details

You can view the configuration details such as hardware and software specifications. You can also get the deployment ID, which you can use in API calls from an endpoint.

Follow these steps to review or update the details for your batch deployment:

  1. From the Deployments tab of your space, click a deployment name.
  2. Click the Deployment details tab to access information that is related to your batch deployment.

View batch deployment details

Creating a batch deployment programmatically by using notebooks

You can create a batch deployment programmatically by using:

To access sample notebooks that demonstrate how to create and manage deployments by using watsonx.ai Runtime Python client, see watsonx.ai Runtime Python client samples and examples.

Testing your batch deployment programmatically

To test your batch deployment programmatically, you must create and run a batch job. After the batch-scoring runs successfully, the results are written to a file.

Retrieving the endpoint for a batch deployment programmatically

To retrieve the endpoint URL of your batch deployment from a notebook:

  1. List the deployments by calling the Python client method client.deployments.list().
  2. Find the row with your deployment. The deployment endpoint URL is listed in the url column.

Learn more

Parent topic: Managing predictive deployments

Generative AI search and answer
These answers are generated by a large language model in watsonx.ai based on content from the product documentation. Learn more