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

0

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',
                          max_concurrent_transforms=0
                          instance_count=1,
                          instance_type='ml.m4.xlarge')
已提問 2 年前檢視次數 1561 次
2 個答案
1

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

AWS
已回答 2 年前
  • @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?

0

It partitions the Amazon S3 objects in the input by key. Please checkout https://docs.aws.amazon.com/sagemaker/latest/dg/batch-transform.html

已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南