aws / aws/amazon-sagemaker-examples

[Bug Report]

Open
#4,843 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
11k
Forks
7k
Avg merge
8h 29m
Merged PRs (30d)
8

Description

**Link to the notebook**
[Add the link to the notebook.
](https://github.com/aws/amazon-sagemaker-examples/blob/default/%20%20%20%20%20%20build_and_train_models/sm-marketplace_build_model_package_for_listing/sm-marketplace_build_model_package_for_listing.ipynb)

**Describe the bug**
As going through the notebook I get the following error

Image

**To reproduce**
The only thing I have changed in the notebook is that I have used an existing sagemaker role and not using the `role = get_execution_role()` in the notebooks. Another thing I have changed is Validation Specificaiton.ValidationRole in the `sagemaker.create_model_package` from role to the arn of the aforementioned role.
The role was giving an errors as it should be the arn of the role. If I let this parameter be role it was giving the following error
```ClientError: An error occurred (ValidationException) when calling the CreateModelPackage operation: 1 validation
error detected: Value 'AmazonSageMaker-ExecutionRole-20230901T123456' at 'validationSpecification.validationRole'
failed to satisfy constraint: Member must satisfy regular expression pattern:
arn:aws[a-z\-]*:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@\-_/]+```

Contributor guide

Open the contributing guide

Research direction

Open build_and_train_models/sm-marketplace_build_model_package_for_listing/sm-marketplace_build_model_package_for_listing.ipynb and reproduce the CreateModelPackage call using an existing SageMaker role ARN. Inspect ValidationSpecification.ValidationRole and the reported validation error. Done means the notebook reaches model package creation without the ValidationRole format error.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, jupyter-notebook
Domain
cloud, machine-learning
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.