1

我看到了这个链接:https://github.com/aws/sagemaker-python-sdk/issues/912,它与我的问题相似但不一样,我的错误是:

Please make sure all images included in the model for the production variant AllTraffic exist, and that the execution role used to create the model has permissions to access them.

由于我的 AWS 账户的安全设置,我无法将 SageMaker 完全访问权限附加到执行角色,但我确实添加了:

{
            "Effect": "Allow",
            "Action": [
                "ecr:SetRepositoryPolicy",
                "ecr:CompleteLayerUpload",
                "ecr:BatchGetImage",                
                "ecr:BatchDeleteImage",
                "ecr:UploadLayerPart",
                "ecr:DeleteRepositoryPolicy",
                "ecr:InitiateLayerUpload",
                "ecr:DeleteRepository",
                "ecr:PutImage"
            ],
            "Resource": "arn:aws:ecr:*:*:repository/*sagemaker*"
        },

在策略中并附加到此执行角色中,我是 SageMaker 的新手,有人知道我为什么会收到此错误吗?

这是一些代码:

from sagemaker.tensorflow.serving import Model

model = Model(model_data=model_data,
              role=role,
              framework_version='1.15.2',
              sagemaker_session=sagemaker_session,
              name=name)

predictor = model.deploy(initial_instance_count=1,
    instance_type='ml.m4.2xlarge',
    endpoint_name=name,
    update_endpoint=False)
4

0 回答 0