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 #3 waits 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!
you can still use the sagemaker classes in your lambda functions.
HuggingFaceModel.transformer.transform() accepts a parameter called wait which defines wether the call should wait until the job completes.
So when you add HuggingFaceModel.transformer.transform(wait=False) it will create the Batch Job but doesn’t wait for anything.