配置本地 JupyterLab 与 SageMaker 链接

问题描述 投票:0回答:1

我正在遵循 https://aws.amazon.com/blogs/machine-learning/schedule-your-notebooks-from-any-jupyterlab-environment-using-the-amazon-sagemaker-jupyterlab-extension/ 上的手册 将本地 JupyterLab 实例与 SageMaker 设施链接,主要是为了在 Amazon 云中功能强大的机器上运行作业,但由于错误而无法运行作业:[Errno 2] 没有这样的文件或目录:'/opt/ml/metadata/resource -元数据.json'

我知道https://docs.aws.amazon.com/sagemaker/latest/dg/nbi-metadata.html,但无法理解我应该如何获取ResourceArnResourceName。为了找出答案,我在 SageMaker 中运行了一个 JL 实例,在其中我公开了一个 resources-metadata.json:

{
    "AppType": "JupyterLab",
    "DomainId": "d-4xxxxxxxxxxx",
    "SpaceName": "test",
    "ExecutionRoleArn": "arn:aws:iam::000000000000:role/service-role/AmazonSageMaker-ExecutionRole-20240412T112060",
    "ResourceArn": "arn:aws:sagemaker:us-east-1: 000000000000:app/d-4xxxxxxxxxxx/test/JupyterLab/default",
    "ResourceName": "default",
    "AppImageVersion": ""
}

ResourceArn 的目标是 JL 的真实云实例,在 JS 是本地实例的场景中我没有该实例。

我错过了什么? 谢谢你。

amazon-sagemaker
1个回答
0
投票

resource-metadata.json 内清空 {object} 就足够了。

© www.soinside.com 2019 - 2024. All rights reserved.