sagemaker.serve.constants#
Constants and enums for SageMaker ModelBuilder and serving functionality.
This module defines: - Framework enum for ML framework identification - Supported model servers and local modes - Default serializers and deserializers by framework - Configuration constants for model serving
Example
Using Framework enum:
from sagemaker.serve.constants import Framework, DEFAULT_SERIALIZERS_BY_FRAMEWORK
# Get serializers for PyTorch
serializer, deserializer = DEFAULT_SERIALIZERS_BY_FRAMEWORK[Framework.PYTORCH]
Classes
|
Enumeration of supported ML frameworks for ModelBuilder. |
- class sagemaker.serve.constants.Framework(value)[source]#
Bases:
EnumEnumeration of supported ML frameworks for ModelBuilder.
This enum provides standardized framework identifiers used throughout the ModelBuilder ecosystem for: - Framework detection from container images - Serializer/deserializer selection - Model server compatibility
Example
Using framework enum:
if detected_framework == Framework.PYTORCH: serializer, deserializer = DEFAULT_SERIALIZERS_BY_FRAMEWORK[Framework.PYTORCH]
- CHAINER = 'Chainer'#
- DJL = 'DJL'#
- HUGGINGFACE = 'HuggingFace'#
- LDA = 'LDA'#
- MXNET = 'MXNet'#
- NTM = 'NTM'#
- PYTORCH = 'PyTorch'#
- SKLEARN = 'SKLearn'#
- SMD = 'SMD'#
- SPARKML = 'SparkML'#
- TENSORFLOW = 'TensorFlow'#
- XGBOOST = 'XGBoost'#