あなたは銀行で働いています。銀行のベンダーから提供されたカスタムの表形式の ML モデルがあります。トレーニング データは機密性が高いため利用できません。モデルは、各予測インスタンスの入力として文字列を受け入れる Vertex AI モデル サービング コンテナーとしてパッケージ化されています。各文字列では、特徴の値がコンマで区切られています。このモデルをオンライン予測用に本番環境にデプロイし、最小限の労力で時間の経過とともに特徴の分布を監視したいと考えています。どうすればよいでしょうか。
正解: A
銀行のベンダーから提供されたモデルを使用し、トレーニング データは機密性が高いため利用できず、モデルは各予測インスタンスの入力として文字列を受け入れる Vertex AI モデル サービング コンテナとしてパッケージ化されている場合、オンライン予測のためにカスタムの表形式 ML モデルを本番環境にデプロイし、最小限の労力で経時的に特徴分布をモニタリングするための最適なオプションは、モデルを Vertex AI モデル レジストリにアップロードし、モデルを Vertex AI エンドポイントにデプロイし、モニタリング目標として特徴ドリフト検出を指定した Vertex AI モデル モニタリング ジョブを作成し、インスタンス スキーマを提供することです。このオプションを使用すると、Vertex AI のパワーとシンプルさを活用して、最小限のコードと構成でモデルを提供およびモニタリングできます。Vertex AI は、Google Cloud 上で機械学習ソリューションを構築およびデプロイするための統合プラットフォームです。Vertex AI は、トレーニング済みのモデルをオンライン予測エンドポイントにデプロイして、個々のインスタンスに対して低レイテンシの予測を提供できます。Vertex AI は、データ分析、モデル開発、モデルのデプロイ、モデルのモニタリング、およびモデル ガバナンスのためのさまざまなツールとサービスも提供できます。 Vertex AI モデル レジストリは、Vertex AI でモデルを保存および管理できるリソースです。Vertex AI モデル レジストリを使用すると、モデルを整理して追跡したり、モデル名、モデルの説明、モデル ラベルなどのさまざまなモデル情報にアクセスしたりできます。Vertex AI モデル サービング コンテナは、Vertex AI でカスタム モデル コードを実行できるリソースです。Vertex AI モデル サービング コンテナを使用すると、モデル コードと依存関係をコンテナ イメージにパッケージ化し、そのコンテナ イメージをオンライン予測エンドポイントにデプロイできます。Vertex AI モデル サービング コンテナは、JSON、CSV、TFRecord など、さまざまな入力形式を受け入れることができます。文字列入力形式は、各予測インスタンスの入力として文字列を受け入れる入力形式の一種です。文字列入力形式を使用すると、特徴値を 1 つの文字列にエンコードし、カンマで区切ることができます。モデルを Vertex AI モデル レジストリにアップロードし、Vertex AI エンドポイントにデプロイすることで、最小限のコードと構成でオンライン予測用のモデルを提供できます。 Vertex AI API または gcloud コマンドライン ツールを使用して、モデルを Vertex AI モデル レジストリにアップロードし、モデル名、モデルの説明、モデルラベルを指定できます。また、Vertex AI API または gcloud コマンドライン ツールを使用して、モデルを Vertex AI エンドポイントにデプロイし、エンドポイント名、エンドポイントの説明、エンドポイント ラベル、エンドポイント リソースを指定することもできます。Vertex AI モデル モニタリング ジョブは、Vertex AI にデプロイされたモデルのパフォーマンスと品質をモニタリングできるリソースです。Vertex AI モデル モニタリング ジョブは、データ ドリフト、予測ドリフト、トレーニング / サービング スキュー、モデルの古さなど、モデルの問題を検出して診断するのに役立ちます。特徴ドリフトは、モデルのトレーニングに使用される特徴と、モデルを提供するために使用される特徴の分布の差を経時的に測定するモデル モニタリング指標の一種です。特徴ドリフトは、オンライン データが経時的に変化し、モデルのパフォーマンスが低下していることを示している可能性があります。特徴ドリフト検出をモニタリング目標として Vertex AI モデル モニタリング ジョブを作成し、インスタンス スキーマを提供することで、最小限の労力で経時的な特徴分布をモニタリングできます。Vertex AI API または gcloud コマンドライン ツールを使用して Vertex AI モデル モニタリング ジョブを作成し、モニタリング目標、モニタリング頻度、アラートしきい値、通知チャネルを指定できます。また、インスタンス スキーマ (予測入力データ内の特徴とそのタイプを記述する JSON ファイル) を指定することもできます。インスタンス スキーマは、Vertex AI モデル モニタリングが文字列入力形式を解析および分析し、特徴分布と距離スコアを計算するのに役立ちます1。
他のオプションは、次の理由によりオプション A ほど優れていません。
* オプション B: モデルを Vertex AI モデルレジストリにアップロードして Vertex AI エンドポイントにデプロイし、特徴スキュー検出をモニタリング目標として Vertex AI モデルモニタリングジョブを作成し、インスタンススキーマを提供すると、オンラインデータの変化を時間の経過とともにモニタリングするのに役立たず、エラーやパフォーマンスの低下を引き起こす可能性があります。特徴スキューは、モデルのトレーニングに使用される特徴の分布と、モデルをトレーニングするために使用される特徴の分布の差を測定するモデルモニタリング指標の一種です。
* 特定の時点でモデルを提供するために使用される特徴。特徴の偏りは、モデルが代表的なデータでトレーニングされていないか、データが時間の経過とともに変化していることを示している可能性があります。特徴の偏りの検出をモニタリング目標として Vertex AI モデル モニタリング ジョブを作成し、インスタンス スキーマを提供することで、最小限の労力で特定の時点での特徴の分布をモニタリングできます。
ただし、モデルを Vertex AI モデル レジストリにアップロードして Vertex AI エンドポイントにデプロイし、特徴スキュー検出をモニタリング目標として Vertex AI モデル モニタリング ジョブを作成し、インスタンス スキーマを提供するだけでは、オンライン データの変化を経時的にモニタリングできず、エラーやパフォーマンスの低下を引き起こす可能性があります。Vertex AI API または gcloud コマンドライン ツールを使用して、モデルを Vertex AI モデル レジストリにアップロードし、モデルを Vertex AI エンドポイントにデプロイし、Vertex AI モデル モニタリング ジョブを作成し、インスタンス スキーマを提供する必要があります。さらに、このオプションでは、オンライン データの経時的な変化やモデルのパフォーマンスと品質を測定するためのより直接的で関連性の高い指標である特徴ドリフトをモニタリングできません1。
* Option C: Refactoring the serving container to accept key-value pairs as input format, uploading the model to Vertex AI Model Registry and deploying the model to a Vertex AI endpoint, creating a Vertex AI Model Monitoring job with feature drift detection as the monitoring objective would require more skills and steps than uploading the model to Vertex AI Model Registry and deploying the model to a Vertex AI endpoint, creating a Vertex AI Model Monitoring job with feature drift detection as the monitoring objective, and providing an instance schema. A key-value pair input format is a type of input format that accepts a key-value pair as input for each prediction instance. A key-value pair input format can help you specify the feature names and values in a JSON object, and separate them by colons. By refactoring the serving container to accept key-value pairs as input format, uploading the model to Vertex AI Model Registry and deploying the model to a Vertex AI endpoint, creating a Vertex AI Model Monitoring job with feature drift detection as the monitoring objective, you can serve and monitor your model with minimal code and configuration. You can write code to refactor the serving container to accept key-value pairs as input format, anduse the Vertex AI API or the gcloud command-line tool to upload the model to Vertex AI Model Registry, deploy the model to a Vertex AI endpoint, and create a Vertex AI Model Monitoring job. However, refactoring the serving container to accept key-value pairs as input format, uploading the model to Vertex AI Model Registry and deploying the model to a Vertex AI endpoint, creating a Vertex AI Model Monitoring job with feature drift detection as the monitoring objective would require more skills and steps than uploading the model to Vertex AI Model Registry and deploying the model to a Vertex AI endpoint, creating a Vertex AI Model Monitoring job with feature drift detection as the monitoring objective, and providing an instance schema. You would need to write code, refactor the serving container, upload the model to Vertex AI Model Registry, deploy the model to a Vertex AI endpoint, and create a Vertex AI Model Monitoring job. Moreover, this option would not use the instance schema, which is a JSON file that can help Vertex AI Model Monitoring parse and analyze the string input format, and calculate the feature distributions and distance scores1.
* Option D: Refactoring the serving container to accept key-value pairs as input format, uploading the model to Vertex AI Model Registry and deploying the model to a Vertex AI endpoint, creating a Vertex AI Model Monitoring job with feature skew detection as the monitoring objective would require more skills and steps than uploading the model to Vertex AI Model Registry and deploying the model to a Vertex AI endpoint, creating a Vertex AI Model Monitoring job with feature drift detection as the monitoring objective, and providing an instance schema, and would not help you monitor the changes in the online data over time, and could cause errors or poor performance. Feature skew is a type of model monitoring metric that measures the difference between the distributions of the features used to train the model and the features used to serve the model at a given point in time. Feature skew can indicate that the model is not trained on the representative data, or that the data is changing over time. By creating a Vertex AI Model Monitoring job with feature skew detection as the monitoring objective, you can monitor the feature distribution at a given point in time with minimal effort. However, refactoring the
* serving container to accept key-value pairs as input format, uploading the model to Vertex AI Model Registry and deploying the model to a Vertex AI endpoint, creating a Vertex AI Model Monitoring job with feature skew detection as the monitoring objective would require more skills and steps than uploading the model to Vertex AI Model Registry and deploying the model to a Vertex AI endpoint, creating a Vertex AI Model Monitoring job with feature drift detection as the monitoring objective, and providing an instance schema, and would not help you monitor the changes in the online data over time, and could cause errors or poor performance. You would need to write code, refactor the serving container, upload the model to Vertex AI Model Registry, deploy the model to a Vertex AI endpoint, and create a Vertex AI Model Monitoring job. Moreover, this option would not monitor the feature drift, which is a more direct and relevant metric formeasuring the changes in the online data over time, and the model performance and quality1.
References:
* Using Model Monitoring | Vertex AI | Google Cloud