amazon-sagemaker

The current AWS identity is not a role for sagemaker?

浪子不回头ぞ 提交于 2021-02-04 14:42:36
问题 I am getting error when i call get_execution_role() from sagemaker in python. I have attached the error for the same. I have added the SagemakerFullAccess Policy to role and user both. 回答1: get_execution_role() is a function helper used in the Amazon SageMaker Examples GitHub repository. These examples were made to be executed from the fully managed Jupyter notebooks that Amazon SageMaker provides. From inside these notebooks, get_execution_role() will return the IAM role name that was passed

How to extract part of the string from `$$.Execution.Name` in AWS step function?

不打扰是莪最后的温柔 提交于 2021-02-04 08:28:24
问题 From this page: https://docs.aws.amazon.com/step-functions/latest/dg/input-output-contextobject.html I'm using "TransformJobName.$": "$$.Execution.Name" to define a dynamic SageMaker job name since the name needs to be unique otherwise statemachine will fail When I executed the statemachine, I got the error below: { "resourceType": "sagemaker", "resource": "createTransformJob.sync", "error": "SageMaker.AmazonSageMakerException", "cause": "2 validation errors detected: Value '808bxx-xxxx-xxxx

Deepar Prediction Quantiles Explained

若如初见. 提交于 2021-01-29 21:16:08
问题 I am working with Deepar and trying to get a better understanding of the quantile values returned. From the documentation, the likelihood hyperparameter explains that: ...provide quantiles of the distribution and return samples . If I look at a single data point the quantiles returned are linear. E.g. the 0.1 quantile has the lowest predicted value and 0.9 quantile has the highest predicted value. I am having trouble understanding this. If these are samples from the distribution, shouldn't

How can I specify content_type in a training job of XGBoost from Sagemaker in Python?

懵懂的女人 提交于 2021-01-29 18:54:13
问题 I am trying to train a model using the sagemaker library. So far, my code is the following: container = get_image_uri(boto3.Session().region_name, 'xgboost', repo_version='0.90-1') estimator = sagemaker.estimator.Estimator(container, role = 'AmazonSageMaker-ExecutionRole-20190305TXXX', train_instance_count = 1, train_instance_type = 'ml.m4.2xlarge', output_path = 's3://antifraud/production/', hyperparameters = {'num_rounds':'400', 'objective':'binary:logistic', 'eval_metric':'error@0.1'})

How to read bucket image from AWS S3 into Sagemaker Jupyter Instance

蓝咒 提交于 2021-01-29 15:33:29
问题 I am very new to AWS and the cloud environment. I am a machine learning engineer, I am planning to build a custom CNN into the AWS environment to predict a given image has an iPhone present or not. What I have done: Step 1: I have created a S3 bucket for iPhone classifier with the below folder structure : Iphone_Classifier > Train > Yes_iphone_images > 1000 images > No_iphone_images > 1000 images > Dev > Yes_iphone_images > 100 images > No_iphone_images > 100 images > Test > 30 random images

How to deploy a Pre-Trained model using AWS SageMaker Notebook Instance?

岁酱吖の 提交于 2021-01-29 09:11:28
问题 I have a pre-trained model which I am loading in AWS SageMaker Notebook Instance from S3 Bucket and upon providing a test image for prediction from S3 bucket it gives me the accurate results as required. I want to deploy it so that I can have an endpoint which I can further integrate with AWS Lambda Function and AWS API GateWay so that I can use the model with real time application. Any idea how can I deploy the model from AWS Sagemaker Notebook Instance and get its endpoint? Code inside the

How to access python variables in Sagemaker Jupyter Notebook shell command

廉价感情. 提交于 2021-01-28 13:32:43
问题 In one of the cells of Sagemaker notebook, I've set a variable region="us-west-2" In subsequent cell, I run following 2 shell commands !echo $region Output us-west-2 However, unable to run aws shell command using this variable !aws ecr get-login-password --region $region $ variable-name doesn't help inside jupyter cell ! shell command 回答1: As answered here: https://stackoverflow.com/a/19674648/5157515 There's no direct way to access python variables with ! command. But with magic command %

How to access python variables in Sagemaker Jupyter Notebook shell command

非 Y 不嫁゛ 提交于 2021-01-28 13:31:33
问题 In one of the cells of Sagemaker notebook, I've set a variable region="us-west-2" In subsequent cell, I run following 2 shell commands !echo $region Output us-west-2 However, unable to run aws shell command using this variable !aws ecr get-login-password --region $region $ variable-name doesn't help inside jupyter cell ! shell command 回答1: As answered here: https://stackoverflow.com/a/19674648/5157515 There's no direct way to access python variables with ! command. But with magic command %

AWS Sagemaker does not update the package

核能气质少年 提交于 2021-01-27 07:12:26
问题 AWS Sagemaker's notebook comes with Scikit-Learn version 0.19.1 I would like to use version 0.20.2. To avoid updating it every time in the notebook code, I tried using the lifecycle configurations. I created one with the following code : #!/bin/bash set -e /home/ec2-user/anaconda3/bin/conda install scikit-learn -y When I run the attached notebook instance and go to the terminal, the version of scikit-learn found with conda list is correct (0.20.2). But when I run a notebook and import sklearn

How to append stepfunction execution id to SageMaker job names?

心不动则不痛 提交于 2021-01-20 13:16:09
问题 I have a step function statemachine which creates SageMaker batch transform job, the definition is written in Terraform, I wanted to add the stepfunction execution id to the batch transform job names: in stepfunction terraform file: definition = templatefile("stepfuntion.json", { xxxx ) in the "stepfuntion.json": {... "TransformJobName": "jobname-$$.Execution.Id", } }, "End": true } } } But after terraform apply, it didn't generate the actual id, it gave me jobname-$$.Execution.Id , can