更新实时 AWS Sagemaker 自动扩展端点实例类型而无需将其放下
Update live AWS Sagemaker auto scaled endpoint instance type without putting it down
我有一个实时 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.
我认为我们需要先使用这个取消注册自动缩放 link
https://docs.aws.amazon.com/sagemaker/latest/dg/endpoint-auto-scaling-delete.html
但我怀疑是否会取消我们的应用程序,并且经过培训的新模型将需要数小时。我们负担不起,如果有更好的方法,请告诉我。
在不影响可用性的情况下更新 Endpoint 实例类型应该没有问题。当您有一个有效的自动缩放策略时,基本方法如下所示:
- 创建一个使用新实例类型的新 EndpointConfig,
ml.t2.2xlarge
- 通过调用
CreateEndpointConfig
. 来完成此操作
- 传入与之前 Endpoint 配置相同的值。您也可以指向您所做的相同
ModelName
。通过重复使用相同的模型,您无需重新训练它或任何东西
- Delete the existing autoscaling policy
- 根据您的自动缩放,如果您在执行此操作时需要缩放,您可能希望增加端点的所需数量。
- 如果您在进行这些 API 调用时遇到流量激增,则如果模型跟不上流量,您可能会面临中断的风险。请记住这一点,并可能提前为这种可能性进行扩展。
- 像以前一样调用
UpdateEndpoint
并指定这个新的 EndpointConfigName
- 等待您的端点状态变为
InService
。这应该需要 10-20 分钟。
- Create a new autoscaling policy 对于这个新端点和生产变体
您应该可以在不牺牲可用性的情况下出发。
我有一个实时 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.
我认为我们需要先使用这个取消注册自动缩放 link https://docs.aws.amazon.com/sagemaker/latest/dg/endpoint-auto-scaling-delete.html
但我怀疑是否会取消我们的应用程序,并且经过培训的新模型将需要数小时。我们负担不起,如果有更好的方法,请告诉我。
在不影响可用性的情况下更新 Endpoint 实例类型应该没有问题。当您有一个有效的自动缩放策略时,基本方法如下所示:
- 创建一个使用新实例类型的新 EndpointConfig,
ml.t2.2xlarge
- 通过调用
CreateEndpointConfig
. 来完成此操作
- 传入与之前 Endpoint 配置相同的值。您也可以指向您所做的相同
ModelName
。通过重复使用相同的模型,您无需重新训练它或任何东西
- 通过调用
- Delete the existing autoscaling policy
- 根据您的自动缩放,如果您在执行此操作时需要缩放,您可能希望增加端点的所需数量。
- 如果您在进行这些 API 调用时遇到流量激增,则如果模型跟不上流量,您可能会面临中断的风险。请记住这一点,并可能提前为这种可能性进行扩展。
- 像以前一样调用
UpdateEndpoint
并指定这个新的EndpointConfigName
- 等待您的端点状态变为
InService
。这应该需要 10-20 分钟。 - Create a new autoscaling policy 对于这个新端点和生产变体
您应该可以在不牺牲可用性的情况下出发。