【问题标题】:Update live AWS Sagemaker auto scaled endpoint instance type without putting it down无需放下即可更新实时 AWS Sagemaker 自动扩展终端节点实例类型
【发布时间】:2020-02-28 04:38:12
【问题描述】:

我有一个实时 AWS Sagemaker 终端节点,我们已在其中启用了自动扩展功能。 现在我想将它从“ml.t2.xlarge”更新为“ml.t2.2xlarge”,但它显示了这个错误

botocore.exceptions.ClientError: An error occurred (ValidationException) when calling the 
UpdateEndpoint operation: The variant(s) "[config1]" must be deregistered as scalable targets with 
Application Auto Scaling before they can be removed or have their instance type updated.

我认为我们需要先使用此链接取消注册自动缩放 https://docs.aws.amazon.com/sagemaker/latest/dg/endpoint-auto-scaling-delete.html

但我怀疑是否会关闭我们的应用程序,并且经过培训的新模型将需要数小时。我们负担不起,所以如果有更好的方法,请告诉我。

【问题讨论】:

    标签: amazon-web-services amazon-sagemaker


    【解决方案1】:

    在不影响可用性的情况下更新 Endpoint 实例类型应该没有问题。当您有一个活动的自动缩放策略时,基本方法如下所示:

    1. 创建一个使用新实例类型ml.t2.2xlarge 的新 EndpointConfig
      1. 请致电CreateEndpointConfig 进行此操作。
      2. 传入与之前端点配置相同的值。您也可以指向相同的ModelName。通过重复使用相同的模型,您无需重新训练它或进行任何其他操作
    2. Delete the existing autoscaling policy
      1. 根据您的自动缩放,您可能希望增加 Endpoint 的所需计数,以防在您执行此操作时需要缩放。
      2. 如果您在进行这些 API 调用时遇到流量高峰,如果模型跟不上流量,您的模型就有中断的风险。请记住这一点,并可能提前扩展以应对这种可能性。
    3. 像以前一样致电UpdateEndpoint 并指定这个新的EndpointConfigName
    4. 等待您的端点状态变为InService。这应该需要 10-20 分钟。
    5. Create a new autoscaling policy 这个新的端点和生产变体

    在不牺牲可用性的情况下,您应该很高兴。

    【讨论】:

    • 当你提到的 10-20 分钟端点状态为“正在更新”时,它是否仍会处理对它的推理请求?
    猜你喜欢
    • 2021-03-27
    • 2020-04-08
    • 2020-07-17
    • 2022-01-20
    • 2020-05-12
    • 1970-01-01
    • 2020-11-07
    • 2014-12-17
    • 2015-06-28
    相关资源
    最近更新 更多