C3W2 Parameter Validation for Variants

Hi, I’m getting a Parameter Validation error when executing the ProductionVariant=… line. I went back and triple checked the parameters in ex1-5 but couldn’t find where the correct parameter is.

Since the missing parameters in exercise 2 & 3 are compliments of each other, I doubt that was where I made the mistake. That leaves exercise 4 & 5 where the Variants are defined. So perhaps the following are incorrect?

model_name=model_a, # Replace None
instance_type=inference_instance_type, # Replace None

Any help would be appreciated.

The details of the error dump is as follows:

ParamValidationError: Parameter validation failed:
Invalid type for parameter ProductionVariants[0].ModelName, value: {‘ModelArn’: ‘arn:aws:sagemaker:us-east-1:040070966761:model/a-1630170542’, ‘ResponseMetadata’: {‘RequestId’: ‘a4f76d2a-f4b5-46da-bfe1-ac037849f3e6’, ‘HTTPStatusCode’: 200, ‘HTTPHeaders’: {‘x-amzn-requestid’: ‘a4f76d2a-f4b5-46da-bfe1-ac037849f3e6’, ‘content-type’: ‘application/x-amz-json-1.1’, ‘content-length’: ‘74’, ‘date’: ‘Sat, 28 Aug 2021 17:09:21 GMT’}, ‘RetryAttempts’: 0}}, type: <class ‘dict’>, valid types: <class ‘str’>
Invalid type for parameter ProductionVariants[1].ModelName, value: {‘ModelArn’: ‘arn:aws:sagemaker:us-east-1:040070966761:model/b-1630170542’, ‘ResponseMetadata’: {‘RequestId’: ‘89fef9e4-23f2-4893-bf2a-91128c1cc6b1’, ‘HTTPStatusCode’: 200, ‘HTTPHeaders’: {‘x-amzn-requestid’: ‘89fef9e4-23f2-4893-bf2a-91128c1cc6b1’, ‘content-type’: ‘application/x-amz-json-1.1’, ‘content-length’: ‘74’, ‘date’: ‘Sat, 28 Aug 2021 17:09:46 GMT’}, ‘RetryAttempts’: 0}}, type: <class ‘dict’>, valid types: <class ‘str’>

Never mind. I found the problem. It’s with the model_name. Thanks for reading.

1 Like