You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

启动AWS SageMaker训练作业时Algorithm ARN不存在报错求助

解决SageMaker AlgorithmEstimator「Algorithm ARN不存在」报错问题

问题核心分析

从报错信息能明显看出,你传入的ARN被重复拼接了:

ClientError: An error occurred (ValidationException) when calling the CreateTrainingJob operation: Algorithm arn:aws:sagemaker:us-east-2:[acc-id]:algorithm/arn:aws:sagemaker:us-east-2:[acc-id]:algorithm/autogluon-tabular-v3-5-cb7001bd0e8243b50adc3338deb44a48 does not exist.

这说明AlgorithmEstimator会自动为输入值添加arn:aws:sagemaker:<region>:<account-id>:algorithm/前缀,但你传入的是完整ARN,导致最终生成的ARN重复无效。

解决方案步骤

  • 修正ARN输入格式:不要传入完整ARN,只传入算法的名称部分。比如原错误输入是arn:aws:sagemaker:us-east-2:[acc-id]:algorithm/autogluon-tabular-v3-5-cb7001bd0e8243b50adc3338deb44a48,改成只传autogluon-tabular-v3-5-cb7001bd0e8243b50adc3338deb44a48。
  • 确认权限与区域匹配:使用AWS Marketplace算法时,需先完成订阅;自有算法要确认已在当前区域正确创建,初始化AlgorithmEstimator时指定的region要和算法所在区域一致。
  • 验证SDK版本兼容性:sagemaker SDK 2.145.0的AlgorithmEstimator可能存在ARN处理逻辑变更,可尝试降级到2.100.0左右版本(该版本兼容完整ARN和名称两种输入格式),或查看官方文档确认最新参数要求。
  • 测试最小化示例:用简化代码验证修复效果:
import sagemaker
from sagemaker.algorithm import AlgorithmEstimator

sagemaker_session = sagemaker.Session()

estimator = AlgorithmEstimator(
    algorithm_name="autogluon-tabular-v3-5-cb7001bd0e8243b50adc3338deb44a48",
    role="你的SageMaker角色ARN",
    instance_count=1,
    instance_type="ml.m5.xlarge",
    region="us-east-2"
)

estimator.fit({"training": "s3://你的训练数据路径"})

内容的提问来源于stack exchange,提问作者hwgoh

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.24 11:52:04