You recently deployed a scikit-learn model to a Vertex Al endpoint You are now testing the model on live production traffic While monitoring the endpoint. you discover twice as many requests per hour than expected throughout the day You want the endpoint to efficiently scale when the demand increases in the future to prevent users from experiencing high latency What should you do?
正解: B
将来需要が増加したときに Vertex AI エンドポイントを効率的にスケーリングするには、Vertex AI エンドポイントにデプロイされ、実際の本番環境トラフィックでテストされた scikit-learn モデルを使用して、予想されるベースライン トラフィックに基づいて適切な minReplicaCount 値を構成するのが最適です。このオプションを使用すると、Vertex AI のパワーとシンプルさを活用して、トラフィック パターンに応じてエンドポイント リソースを自動的にスケーリングできます。Vertex AI は、Google Cloud で機械学習ソリューションを構築およびデプロイするための統合プラットフォームです。Vertex AI は、トレーニング済みのモデルをオンライン予測エンドポイントにデプロイして、個々のインスタンスに対して低レイテンシの予測を提供できます。また、Vertex AI は、データ分析、モデル開発、モデル デプロイ、モデル モニタリング、モデル ガバナンスのためのさまざまなツールとサービスを提供することもできます。minReplicaCount 値は、負荷に関係なく、エンドポイントが常に持つ必要があるレプリカの最小数を指定するパラメータです。minReplicaCount 値を使用すると、予想されるベースライン トラフィックを処理するのに十分なリソースがエンドポイントにあることを確認し、高レイテンシやエラーを回避できます。予想されるベースライン トラフィックに基づいて適切な minReplicaCount 値を構成することで、将来的に需要が増加したときにエンドポイントを効率的にスケーリングできます。minReplicaCount 値は、モデルをエンドポイントにデプロイするときに設定することも、後で更新することもできます。Vertex AI は、ターゲット使用率と自動スケーリング メトリック 1 に基づいて、minReplicaCount 値と maxReplicaCount 値の範囲内でレプリカの数を自動的に増減します。
他のオプションは、次の理由によりオプション B ほど優れていません。
* Option A: Deploying two models to the same endpoint and distributing requests among them evenly would not allow you to scale your endpoint efficiently when the demand increases in the future, and could increase the complexity and cost of the deployment process. A model is a resource that represents a machine learning model that you can use for prediction. A model can have one or more versions, which are different implementations of the same model. A model version can help you experiment and iterate on your model, and improve the model performance and accuracy. An endpoint is a resource that provides the service endpoint (URL) you use to request the prediction. An endpoint can have one or more deployed models, which are instances of model versions that are associated with physical resources. A deployed model can help you serve online predictions with low latency, and scale up or down based on the traffic. By deploying two models to the same endpoint and distributing requests among them evenly, you can create a load balancing mechanism that can distribute the traffic across the models, and reduce the load on each model. However, deploying two models to the same endpoint and distributing requests among them evenly would not allow you to scale your endpoint efficiently when the demand increases in the future, and could increase the complexity and cost of the deployment process. You would need to write code, create and configure the two models, deploy the models to the same endpoint, and distribute the requests among them evenly. Moreover, this option would not use the autoscaling feature of Vertex AI, which can automatically adjust the number of replicas based on the traffic patterns, and provide various benefits, such as optimal resource utilization, cost savings, and performance improvement2.
* オプション C: autoscalingMetricSpecs 構成のターゲット使用率を高い値に設定すると、将来需要が増加したときにエンドポイントを効率的にスケーリングできなくなり、エラーやパフォーマンスの低下を引き起こす可能性があります。ターゲット使用率は、各レプリカの望ましい使用率レベルを指定するパラメータです。ターゲット使用率は、自動スケーリング プロセスの速度と精度に影響を与える可能性があります。ターゲット使用率を高くすると、レプリカの数を減らすことができますが、レイテンシの増加、スループットの低下、またはリソースの枯渇を引き起こす可能性もあります。autoscalingMetricSpecs 構成のターゲット使用率を高い値に設定すると、各レプリカの使用率レベルを上げ、リソースを節約できます。ただし、autoscalingMetricSpecs 構成のターゲット使用率を高い値に設定すると、将来需要が増加したときにエンドポイントを効率的にスケーリングできなくなり、エラーやパフォーマンスの低下を引き起こす可能性があります。コードを記述し、autoscalingMetricSpecs を作成して構成し、ターゲット使用率を高い値に設定する必要があります。さらに、このオプションでは、エンドポイントに予想されるベースライン トラフィックを処理するのに十分なリソースがあることが保証されないため、遅延が長くなったりエラーが発生したりする可能性があります1。
* オプションD: モデルのマシンタイプをGPUを使用するものに変更すると、将来的に需要が増加したときにエンドポイントを効率的に拡張できなくなり、展開プロセスの複雑さとコストが増加する可能性があります。マシンタイプは、仮想マシンのタイプを指定するパラメータです。
* 予測サービスがデプロイされたモデルに使用するマシン。マシンタイプは、予測プロセスの速度と精度に影響を与える可能性があります。GPU を利用するマシンタイプは、予測の計算と処理を高速化し、同時により多くの予測リクエストを処理できるようにします。モデルのマシンタイプを GPU を利用するものに変更することで、モデルの予測パフォーマンスと効率を向上させることができます。ただし、モデルのマシンタイプを GPU を利用するものに変更すると、将来需要が増加したときにエンドポイントを効率的にスケーリングできなくなり、デプロイ プロセスの複雑さとコストが増加する可能性があります。コードを記述し、モデルを作成して構成し、モデルをエンドポイントにデプロイし、マシンタイプを GPU を利用するものに変更する必要があります。さらに、このオプションでは、トラフィック パターンに基づいてレプリカの数を自動的に調整し、最適なリソース使用率、コスト削減、パフォーマンス向上などのさまざまな利点を提供できる Vertex AI の自動スケーリング機能が使用されません2。
参考文献:
* 予測用のコンピューティング リソースを構成する | Vertex AI | Google Cloud
* エンドポイントにモデルをデプロイする | Vertex AI | Google Cloud