aws / sagemaker-python-sdk

A library for training and deploying machine learning models on Amazon SageMaker
https://sagemaker.readthedocs.io/
Apache License 2.0
2.11k stars 1.14k forks source link

fix: trn1 instance family does not support volume size #4828

Closed evakravi closed 3 months ago

evakravi commented 3 months ago

Issue #, if available:

Description of changes: When a trn1 instance family is used, the PySDK would automatically use volume size argument when creating the endpoint config. However, this instance family does not support attaching an ebs volume, hence volume size argument throws a service exception. This PR updates the volume_size_supported function to correctly identify trn1 instance types as not supporting volume size.

Testing done: Unit tests added.

Merge Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.

General

Tests

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.