Building upon the answer from Gili.
Using the aws CLI and jq :
aws --region us-east-1 pricing get-products \
--service-code AmazonSageMaker \
--filters Type=TERM_MATCH,Field=regionCode,Value=eu-north-1 \
| jq -r '.PriceList[]|fromjson|select(.product.productFamily == "ML Instance")|.product.attributes.instanceName'\
|sort\
|uniq
ml.c5.12xlarge
ml.c5.18xlarge
ml.c5.24xlarge
ml.c5.2xlarge
ml.c5.4xlarge
ml.c5.9xlarge
ml.c5.large
...
ml.t3.2xlarge
ml.t3.large
ml.t3.medium
ml.t3.xlarge
it uses
aws pricing get-products--region us-east-1is important because the Pricing service is not widely available--filters Type=TERM_MATCH,Field=regionCode,Values=eu-north-1to restrict the listing to products ineu-north-1region, the number of products for AmazonSageMaker alone across all regions is huge, so better to let AWS to filter out those early
jqis used to further filter the output, it seems it's not possible to filter byproductFamilyat theaws pricing get-productsso we need to do it withjq-rremoves the quotes from the output.PriceList[]will iterate over all the prices returned byaws pricing get-productsfromjsonwill parse the each string as JSON (.PriceListis an array of strings)select(.product.productFamily == "ML Instance")will filter out all other products.product.attributes.instanceNameextracts the instance type from each product.
AWS
docs.aws.amazon.com › amazon sagemaker › developer guide › machine learning environments offered by amazon sagemaker ai › amazon sagemaker studio › amazon sagemaker studio classic › use amazon sagemaker studio classic notebooks › available resources for amazon sagemaker studio classic notebooks › instance types available for use with amazon sagemaker studio classic notebooks
Instance Types Available for Use With Amazon SageMaker Studio Classic Notebooks - Amazon SageMaker AI
For most use cases, you should use a ml.t3.medium. This is the default instance type for CPU-based SageMaker images, and is available as part of the AWS Free Tier
AWS
docs.aws.amazon.com › amazon sagemaker › developer guide › model training › types of algorithms › built-in algorithms and pretrained models in amazon sagemaker › parameters for built-in algorithms › instance types for built-in algorithms
Instance Types for Built-in Algorithms - Amazon SageMaker AI
Suggested instance types for Amazon SageMaker AI algorithms.
Videos
33:21
How to Set Up an AWS SageMaker Notebook Instance for Machine Learning ...
31:34
AWS re:Invent 2020: How to choose the right instance type for ML ...
AWS re:Invent 2019: The right instance type in Amazon ...
01:02
Amazon SageMaker Studio notebooks now support G6e instance types ...
16:45
Fully-Managed Notebook Instances with Amazon SageMaker - a Deep ...
SageMaker
sagemaker.readthedocs.io › en › v2.226.0 › api › utility › instance_types.html
Instance Types — sagemaker 2.226.0 documentation
sagemaker.instance_types.retrieve(region=None, model_id=None, model_version=None, hub_arn=None, scope=None, tolerate_vulnerable_model=False, tolerate_deprecated_model=False, sagemaker_session=<sagemaker.session.Session object>, training_instance_type=None)¶ · Retrieves the supported training instance types for the model matching the given arguments. ... region (str) – The AWS Region for which to retrieve the supported instance types.
Amazon Web Services
aws.amazon.com › machine learning › amazon sagemaker › pricing
SageMaker pricing - AWS
5 days ago - Fine-grained permissions, powered by AWS Lake Formation, are provided at no extra cost. For the most accurate and detailed pricing information, consult lakehouse pricing. SageMaker AI follows a pay-as-you-go pricing model with no upfront commitments or minimum fees. The key pricing dimensions for SageMaker AI include instance usage (compute resources used in training, hosting, and notebook instances), storage (Amazon SageMaker notebooks, Amazon Elastic Block Store (Amazon EBS) volumes, and Amazon S3), data processing jobs, model deployment, and MLOps (Amazon SageMaker Pipelines and Model Monitor).
Top answer 1 of 2
4
Building upon the answer from Gili.
Using the aws CLI and jq :
aws --region us-east-1 pricing get-products \
--service-code AmazonSageMaker \
--filters Type=TERM_MATCH,Field=regionCode,Value=eu-north-1 \
| jq -r '.PriceList[]|fromjson|select(.product.productFamily == "ML Instance")|.product.attributes.instanceName'\
|sort\
|uniq
ml.c5.12xlarge
ml.c5.18xlarge
ml.c5.24xlarge
ml.c5.2xlarge
ml.c5.4xlarge
ml.c5.9xlarge
ml.c5.large
...
ml.t3.2xlarge
ml.t3.large
ml.t3.medium
ml.t3.xlarge
it uses
aws pricing get-products--region us-east-1is important because the Pricing service is not widely available--filters Type=TERM_MATCH,Field=regionCode,Values=eu-north-1to restrict the listing to products ineu-north-1region, the number of products for AmazonSageMaker alone across all regions is huge, so better to let AWS to filter out those early
jqis used to further filter the output, it seems it's not possible to filter byproductFamilyat theaws pricing get-productsso we need to do it withjq-rremoves the quotes from the output.PriceList[]will iterate over all the prices returned byaws pricing get-productsfromjsonwill parse the each string as JSON (.PriceListis an array of strings)select(.product.productFamily == "ML Instance")will filter out all other products.product.attributes.instanceNameextracts the instance type from each product.
2 of 2
1
You can get the list of ml instances with this CLI call (doc):
aws pricing get-products --service-code AmazonSageMaker --filters Type=TERM_MATCH,Field=location,Value="US East (N. Virginia)"
You'll need to filter the results further. Note that a particular ml instance type might be available for a certain SageMaker feature like training, but not for inference. And be available in one region but not another.
If you're end goal is to get technical details, you could first fine the relevant ml.* instances (maybe even with regex), then use the EC2 describe instance type to get more details (just strip down the ml. prefix).
You can find relevant Python code in the "Total Cost" section of my notebook here.
SageMaker
sagemaker.readthedocs.io › en › stable › api › utility › instance_types.html
Instance Types — sagemaker 2.254.1 documentation
sagemaker.instance_types.retrieve(region=None, model_id=None, model_version=None, hub_arn=None, scope=None, tolerate_vulnerable_model=False, tolerate_deprecated_model=False, sagemaker_session=<sagemaker.session.Session object>, training_instance_type=None) · Retrieves the supported training instance types for the model matching the given arguments. ... region (str) – The AWS Region for which to retrieve the supported instance types.
SageMaker
sagemaker.readthedocs.io › en › v2.243.1 › api › utility › instance_types.html
Instance Types — sagemaker 2.243.1 documentation
sagemaker.instance_types.retrieve(region=None, model_id=None, model_version=None, hub_arn=None, scope=None, tolerate_vulnerable_model=False, tolerate_deprecated_model=False, sagemaker_session=<sagemaker.session.Session object>, training_instance_type=None)¶ · Retrieves the supported training instance types for the model matching the given arguments. ... region (str) – The AWS Region for which to retrieve the supported instance types.
SageMaker
sagemaker.readthedocs.io › en › v2.221.1 › api › utility › instance_types.html
Instance Types — sagemaker 2.221.1 documentation
sagemaker.instance_types.retrieve(region=None, model_id=None, model_version=None, scope=None, tolerate_vulnerable_model=False, tolerate_deprecated_model=False, sagemaker_session=<sagemaker.session.Session object>, training_instance_type=None)¶ · Retrieves the supported training instance types for the model matching the given arguments. ... region (str) – The AWS Region for which to retrieve the supported instance types.
AWSstatic
d1.awsstatic.com › events › reinvent › 2019 › REPEAT_1_Choose_the_right_instance_type_in_Amazon_SageMaker,_with_Texas_Instruments_AIM311-R1.pdf pdf
Awsstatic
We cannot provide a description for this page right now
Top answer 1 of 3
1
Yes, you can use spot instances. I recommend it, and always run training on spot instances. If you are using the Python SDK, add the following parameters to your Estimator:
```
use_spot_instances=True,
max_run={maximum runtime here},
max_wait={maximum wait time},
checkpoint_s3_uri={URI of your bucket and folder },
```
See the documentation for more details here: https://docs.aws.amazon.com/sagemaker/latest/dg/model-managed-spot-training.html
As far as instance types are concerned, the individual algorithms contain some initial recommendations for instances types:
https://docs.aws.amazon.com/sagemaker/latest/dg/algos.html
For example, see the EC2 Instance Recommendation for the Image Classification Algorithm:
https://docs.aws.amazon.com/sagemaker/latest/dg/image-classification.html
There was a presentation at re:Invent 2020 - How to choose the right instance type for ML inference: https://www.youtube.com/watch?v=0DSgXTN7ehg
Hope this helps
2 of 3
1
And for the selection of instance type for inference, you might want to look at Amazon SageMaker Inference Recommender:
https://docs.aws.amazon.com/sagemaker/latest/dg/inference-recommender.html
SageMaker
sagemaker.readthedocs.io › en › v2.224.1 › api › utility › instance_types.html
Instance Types — sagemaker 2.224.1 documentation
sagemaker.instance_types.retrieve(region=None, model_id=None, model_version=None, hub_arn=None, scope=None, tolerate_vulnerable_model=False, tolerate_deprecated_model=False, sagemaker_session=<sagemaker.session.Session object>, training_instance_type=None)¶ · Retrieves the supported training instance types for the model matching the given arguments. ... region (str) – The AWS Region for which to retrieve the supported instance types.
SageMaker
sagemaker.readthedocs.io › en › v2.213.0 › api › utility › instance_types.html
Instance Types — sagemaker 2.213.0 documentation
sagemaker.instance_types.retrieve(region=None, model_id=None, model_version=None, scope=None, tolerate_vulnerable_model=False, tolerate_deprecated_model=False, sagemaker_session=<sagemaker.session.Session object>, training_instance_type=None)¶ · Retrieves the supported training instance types for the model matching the given arguments. ... region (str) – The AWS Region for which to retrieve the supported instance types.
ClassMethod
dev.classmethod.jp › articles › how-to-choose-the-right-amazon-sagemaker-instance-type
How to Choose the Right Amazon SageMaker Instance Type | DevelopersIO
Amazon SageMaker provides a broad choice of instance types tailored for various machine learning workloads, so it's critical to thoroughly consider your options to ensure you're picking the appropriate instance type for your use case. You can guarantee that your SageMaker tasks operate smoothly and effectively by doing so. AWSのGPU系EC2インスタンスをまとめてみた
SageMaker
sagemaker.readthedocs.io › en › v2.205.0 › api › utility › instance_types.html
Instance Types — sagemaker 2.205.0 documentation
sagemaker.instance_types.retrieve(region=None, model_id=None, model_version=None, scope=None, tolerate_vulnerable_model=False, tolerate_deprecated_model=False, sagemaker_session=<sagemaker.session.Session object>, training_instance_type=None)¶ · Retrieves the supported training instance types for the model matching the given arguments. ... region (str) – The AWS Region for which to retrieve the supported instance types.
SageMaker
sagemaker.readthedocs.io › en › v2.244.1 › api › utility › instance_types.html
Instance Types — sagemaker 2.244.1 documentation
sagemaker.instance_types.retrieve(region=None, model_id=None, model_version=None, hub_arn=None, scope=None, tolerate_vulnerable_model=False, tolerate_deprecated_model=False, sagemaker_session=<sagemaker.session.Session object>, training_instance_type=None) · Retrieves the supported training instance types for the model matching the given arguments. ... region (str) – The AWS Region for which to retrieve the supported instance types.
Holori
holori.com › accueil › blog › ultimate aws sagemaker pricing guide
Holori - Ultimate AWS Sagemaker pricing guide
October 23, 2024 - SageMaker Inference Options: Provides flexible deployment solutions—such as Real-Time Inference, Batch Transform, Multi-Model Endpoints, and Serverless Inference. Costs are generally based on the compute instance type, prediction duration, and data transfer. AWS SageMaker offers a variety of services that can be broadly categorized into four main areas:
AWS
docs.aws.amazon.com › amazon sagemaker › developer guide › deploy models for inference › model performance optimization with sagemaker neo › cloud instances › supported instance types and frameworks
Supported Instance Types and Frameworks - Amazon SageMaker AI
Currently, you can use the ml_inf1 instance to deploy your compiled models. Currently, you can deploy your SageMaker Neo-compiled model to AWS Inferentia2-based Amazon EC2 Inf2 instances (in US East (Ohio) Region), and to AWS Trainium-based Amazon EC2 Trn1 instances (in US East (N.
Top answer 1 of 2
1
The instance types you are seeing are Fast Launch Instances ( which are instance types designed to launch in under two minutes).
In order to see all the types of instances, click on the switch on top of the instance type list that says "Fast Launch", that should display the rest of available instances.
Here is additional info about fast launch instances: https://docs.aws.amazon.com/sagemaker/latest/dg/notebooks.html
Hope it helps!
2 of 2
0
!Enter image description here
I am not able to change the instance type in sagemaker studio.
can someone help?
attached screenshot.
AWS
docs.aws.amazon.com › amazon sagemaker › developer guide › model training › distributed training in amazon sagemaker ai › run distributed training with the sagemaker ai distributed data parallelism library › supported frameworks, aws regions, and instances types
Supported frameworks, AWS Regions, and instances types - Amazon SageMaker AI
Check supported frameworks, AWS Regions, instances, and models by the SageMaker AI distributed data parallelism (SMDDP) library.