0 / 0
Creating a batch deployment
Creating a batch deployment

Creating a batch deployment

A batch deployment processes input data from a file, data connection, or connected data in a storage bucket, and writes the output to a file.

For information on how to create a batch deployment job, refer to Creating jobs in deployment spaces.

Before you begin

  1. Save a model to a deployment space.
  2. Promote or add the input file for the batch deployment to the space. For details on promoting an asset to a space, refer to Deployment spaces.

Structuring the input data

How you structure the input data, also known as the payload, for the batch job depends on the framework for the asset you are deploying. For supported input type by framework, refer to Batch deployment details.

A .csv input file or other structured data formats should be formatted to match the schema of the asset. List the column names (fields) in the first row and values to be scored in subsequent rows. For example:

PassengerId, Pclass, Name, Sex, Age, SibSp, Parch, Ticket, Fare, Cabin, Embarked
1,3,"Braund, Mr. Owen Harris",0,22,1,0,A/5 21171,7.25,,S
4,1,"Winslet, Mr. Leo Brown",1,65,1,0,B/5 200763,7.50,,S

A JSON input file should provide the same information on fields and values, using this format:

{"input_data":[{
        "fields": [<field1>, <field2>, ...],
        "values": [[<value1>, <value2>, ...]]
}]}

For example:

{"input_data":[{
        "fields": ["PassengerId","Pclass","Name","Sex","Age","SibSp","Parch","Ticket","Fare","Cabin","Embarked"],
        "values": [[1,3,"Braund, Mr. Owen Harris",0,22,1,0,"A/5 21171",7.25,null,"S"],
                  [4,1,"Winselt, Mr. Leo Brown",1,65,1,0,"B/5 200763",7.50,null,"S"]]
}]}

Creating a batch deployment

  1. From the deployment space, click the name of the saved model you want to deploy. The model detail page opens.
  2. Click Create deployment.
  3. Choose Batch as the deployment type and enter a name for your deployment.
  4. Choose a hardware definition based on the CPU and RAM that should be allocated for this deployment.

  5. Click Create to create the deployment.

  6. When the status changes to Deployed, the deployment creation is complete.

Viewing deployment details

Click the name of a deployment to view the details.

View 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. For details, refer to Looking up a deployment endpoint.

Data sources for scoring a batch deployment

The kinds of data sources supported in scoring vary by framework. For details, see Batch deployment details.

Creating batch deployments programmatically

See Machine Learning samples and examples for links to sample notebooks that demonstrate creating batch deployments using the Watson Machine Learning REST API and Watson Machine Learning Python client library.

Parent topic: Deploying assets

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