I am new here and am strugling with some basic things. I am trying to implement a DeepAR model, but maybe due to an update from sagemaker it doesn't find the correct path as it did on the example.. Can someone tell me why is it happening and how o fix it?
Error: ClientError: An error occurred (ValidationException) when calling the CreateTransformJob operation: Could not find model "arn:aws:sagemaker:eu-central-1:900386373554:model/forecasting-deepar-2022-06-21-14-12-51-560".
This is the Batch Transformation I am trying to implement:
-Batch Transform import boto3 -Create the SageMaker Boto3 client boto3_sm = boto3.client('sagemaker')
import time from time import gmtime, strftime
batch_job_name = 'Batch-Transform-' + strftime("%Y-%m-%d-%H-%M-%S", gmtime()) input_location = 's3://sagemaker-eu-central-1-900386373554/deepar-rossmann/input/prediction_input.json' output_location = 's3://{}/{}/output/{}'.format(bucket, prefix, batch_job_name)
request =
{
"BatchStrategy": "SingleRecord",
"MaxPayloadInMB": 100,
"Environment": {
"DEEPAR_INFERENCE_CONFIG" : "{ "num_samples": 200, "output_types": ["mean"] }"
},
"TransformJobName": batch_job_name,
"ModelName": 'forecasting-deepar-2022-06-21-14-12-51-560',
"TransformOutput": {
"S3OutputPath": output_location,
"Accept": "application/jsonlines",
"AssembleWith": "Line"
},
[...]
I am following this project: https://github.com/CatherineSai/project_sales_prediction_DEEPAR Notebook 3 of 3 step 49
--> ModelName is copied from the finished training job at aws console
Thanks
In order to launch a SageMaker Batch Transform Job you require a
SageMaker Model
. Kindly confirm that theModelName
you are passing exists in theModels
page in the Console (Inference tab > Models)