Lambda and Batch Transform
Hi!I am trying to setup a lambda and a batch transform.  These are the steps that was executed in Lambda:HuggingFaceModel()HuggingFaceModel.transformer()HuggingFaceModel.transfomer.transform()The issue is that step#3waits for a response return from sagemaker’s batch transform job.  This takes several minutes which is billed for lambda.  For other batch transform jobs using boto3.sagemaker.create_transform_job, the status is returned immediately after a successful send.  Does anyone have any experience with the batch transform on lambda and having it returned immediately without waiting for a response?  Thanks!
2021-11-10T01:14:24Z
Ha!  As I was writing this out, I realized then I can just call boto3.sagemaker.create_transform_job and it works!
2021-11-10T07:48:28Z
Hello@vng510,you can still use the sagemaker classes in your lambda functions.vng510:HuggingFaceModel()HuggingFaceModel.transformer()HuggingFaceModel.transfomer.transform()HuggingFaceModel.transformer.transform()accepts a parameter calledwaitwhich defines wether the call should wait until the job completes.So when you addHuggingFaceModel.transformer.transform(wait=False)it will create the Batch Job but doesn’t wait for anything.https://sagemaker.readthedocs.io/en/stable/api/inference/transformer.html#sagemaker.transformer.Transformer.transform
2021-11-10T16:02:27Z
Thanks philschmid.  I missed that completely.