By using AWS re:Post, you agree to the Terms of Use

how to configure max concurrent transforms and instance count parameter in batch transform ?


configuring a batch job for inference in sagemaker ( sample code below) . for my use case, there are multiple input files and i'm trying to configure such that it can process files one by one or if the instance type allows process them in parallel. if value of max concurrrent transforms is greater than 1, does it processes file in parallel. as things are predefined for the job , before it starts , for exampel the instance_count is already set to 1. how does it do horizontal scaling? can it add add more instances. does the value of instance type or instance count dictate what value we can configure for max concurrent transforms parameter?

from sagemaker.transformer import Transformer

transformer = Transformer(model_name='my-previously-trained-model',
2 Answers

To add to it, you can set the BatchStrategy to MultiLine in order to speed up the processing. General guideline is - number of workers/instances is a multiple of number of files in S3 to process. If MaxConcurrentTransforms is set to 0 or left unset, Amazon SageMaker checks the optional execution-parameters to determine the settings for your chosen algorithm

answered 6 months ago
  • @AWS-Anonymous - thanks. I am inquiring if there is a way we can figure out a value for MaxConcurrentTransforms when we bring our own model/algorithm/container. can the value equal be to # of cpu available in whatever instance type we configure?


It partitions the Amazon S3 objects in the input by key. Please checkout

answered 6 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions