Vertex AI 预测 - 自动缩放无法将最小节点设置为 0

Vertex AI prediction - Autoscaling cannot set minimum node to 0

我不清楚模型预测的 Vertex AI 定价。在 documentation 标题下 更多关于预测节点的自动缩放 提到的要点之一是:

"If you choose automatic scaling, the number of nodes scales automatically, and can scale down to zero for no-traffic durations"

后面文档中提供的示例似乎也表明在没有流量的时期内,零个节点在使用中。但是,当我在 Vertex AI 中创建端点时,在 Autoscaling 标题下显示:

"Autoscaling: If you set a minimum and maximum, compute nodes will scale to meet traffic demand within those boundaries"

“计算节点的最小数量”下的0值是不允许的,所以你必须输入1或更大,并且提到:

Default is 1. If set to 1 or more, then compute resources will continuously run even without traffic demand. This can increase cost but avoid dropped requests due to node initialization.

我的问题是,当我通过将最小值设置为 1 并将最大值设置为 10 来 select 自动缩放时会发生什么。1 个节点是否始终 运行 连续?或者它是否像文档中建议的那样在没有流量的情况下缩小到 0 个节点。

为了测试,我部署了一个具有自动缩放功能的端点(最小值和最大值设置为 1),然后当我发送预测请求时,响应几乎是立即的,这表明该节点已经启动。大约一个小时后我又做了一次,再次立即响应表明该节点可能永远不会关闭。此外,对于高延迟要求,是否可以自动缩放到 0 个节点,如果这确实可能,甚至是可行的,即我们可以期望从 0 个节点启动的延迟是多少?

您使用的是 N1 还是非 N1 机器类型?如果要自动缩放到零,则必须使用非 N1 机器。从节点分配看second note

Note: Versions that use a Compute Engine (N1) machine type cannot scale down to zero nodes. They can scale down to 1 node, at minimum.

更新:AI Platform支持缩放到零,而Vertex AI目前不支持。来自 scaling documentation, nodes can scale but there is no mention that it can scale down to zero. Here's a public feature request 想要跟踪此问题的人。

关于延迟要求,实际输出会有所不同。但是,根据文档需要注意的一件事是,该服务可能无法以足够快的速度使节点在线以跟上请求流量的大峰值。如果您的流量经常出现陡峭的峰值,并且如果可靠的低延迟对您的应用程序很重要,您可能需要考虑手动缩放。

其他参考资料:https://cloud.google.com/ai-platform/prediction/docs/machine-types-online-prediction#automatic_scaling

目前无法将 N1 台机器缩放到零 - 我们计划在 2022 年添加此支持(希望如此)。 mls- 传统 ai 平台上的机器可以扩展到 0 但是,它不支持 GPU 并且模型大小有较小的限制(2G?)