我正在Sagemaker中运行一个关于英语和德语翻译的示例笔记本,但每当我运行以下代码块时,就会出现错误:
%%time
sage = boto3.client('sagemaker')
if not use_pretrained_model:
print("False")
info = sage.describe_training_job(TrainingJobName=job_name)
model_name=job_name
model_data = info['ModelArtifacts']['S3ModelArtifacts']
# model_data = info['InputDataConfig'][0]['DataSource']['S3DataSource']['S3Uri']
print(model_name)
print(model_data)
primary_container = {
'Image': container,
'ModelDataUrl': model_data
}
create_model_response = sage.create_model(
ModelName = model_name,
ExecutionRoleArn = role,
PrimaryContainer = primary_container)
print(create_model_response['ModelArn'])
错误是:
KeyError: 'ModelArtifacts'
显然,关键的模型构件已经不存在了。他们改了吗?用什么代替
目前没有回答
相关问题 更多 >
编程相关推荐