Skip to content

feat: support transform ami version in Amazon SageMaker transform jobs#5521

Open
ZhengfeiJi wants to merge 3 commits intoaws:masterfrom
ZhengfeiJi:transform_ami_version_v2
Open

feat: support transform ami version in Amazon SageMaker transform jobs#5521
ZhengfeiJi wants to merge 3 commits intoaws:masterfrom
ZhengfeiJi:transform_ami_version_v2

Conversation

@ZhengfeiJi
Copy link

Issue #5204

Description of changes:

Added support for the TransformAmiVersion parameter in the Transformer class, allowing users to specify a preconfigured Amazon Machine Image (AMI) when launching transform jobs.

Usage:

  transformer = Transformer(..., transform_ami_version="al2-ami-sagemaker-batch-gpu-535")
  transformer.transform(data=...)

Code Path:

transform() 
    → _get_transform_args()
      → _load_config()
        → _prepare_resource_config(self.transform_ami_version)  ← Uses instance attribute
    → _get_transform_request(resource_config=...)
      → TransformResources(**resource_config)  ← Contains transform_ami_version

Tests:
Unit tests for the new param are added

Ref:
https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_TransformResources.html

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@nargokul
Copy link
Contributor

Could you please add integ tests for this

@ZhengfeiJi
Copy link
Author

Are there existing integ tests for transformers? This is a small change, wondering how to write integ tests for this small change only. I couldn't find any existing integ tests to build upon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments