'sagemaker.estimator.Estimator containers eu-west-2
Looking at this, specifically:
containers = {'us-west-2': '433757028032.dkr.ecr.us-west-2.amazonaws.com/xgboost:latest',
'us-east-1': '811284229777.dkr.ecr.us-east-1.amazonaws.com/xgboost:latest',
'us-east-2': '825641698319.dkr.ecr.us-east-2.amazonaws.com/xgboost:latest',
'eu-west-1': '685385470294.dkr.ecr.eu-west-1.amazonaws.com/xgboost:latest'}
sess = sagemaker.Session()
xgb = sagemaker.estimator.Estimator(containers[boto3.Session().region_name],
role,
instance_count=1,
instance_type='ml.m4.xlarge',
output_path='s3://{}/{}/output'.format(bucket, prefix),
sagemaker_session=sess)
where do these entries (contain image names?):
'685385470294.dkr.ecr.eu-west-1.amazonaws.com/xgboost:latest'
come from? I am especially after a eu-west-2 one - hope there is one (-: Thanks!
PS:
It may be that I can just run - at run time?:
from sagemaker import image_uris
image_uris.retrieve(framework='xgboost', region='eu-west-2', version='latest')
Solution 1:[1]
I'm not an expert, but those are the container registry path and you can find the full list here.
Solution 2:[2]
Yes.
You can use this code snippet:
from sagemaker import image_uris
image_uris.retrieve(framework='xgboost', region='eu-west-2', version='latest')
and it will give you this value:
644912444149.dkr.ecr.eu-west-2.amazonaws.com/xgboost:latest
This is the latest version of the container but it not recommended to run in prod environments. https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-algo-docker-registry-paths.html
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | rok |
Solution 2 | CrzyFella |