ResourceConfiguration クラス
Azure Machine Learning リソースのリソース構成の詳細を定義します。
ResourceConfiguration を初期化します。
- 継承
-
builtins.objectResourceConfiguration
コンストラクター
ResourceConfiguration(cpu=None, memory_in_gb=None, gpu=None)
パラメーター
注釈
このクラスを使用してリソース構成を初期化します。 たとえば、次のコードからは、フレームワーク、入力と出力のデータセット、リソース構成を指定し、モデルを登録する方法がわかります。
import sklearn
from azureml.core import Model
from azureml.core.resource_configuration import ResourceConfiguration
model = Model.register(workspace=ws,
model_name='my-sklearn-model', # Name of the registered model in your workspace.
model_path='./sklearn_regression_model.pkl', # Local file to upload and register as a model.
model_framework=Model.Framework.SCIKITLEARN, # Framework used to create the model.
model_framework_version=sklearn.__version__, # Version of scikit-learn used to create the model.
sample_input_dataset=input_dataset,
sample_output_dataset=output_dataset,
resource_configuration=ResourceConfiguration(cpu=1, memory_in_gb=0.5),
description='Ridge regression model to predict diabetes progression.',
tags={'area': 'diabetes', 'type': 'regression'})
print('Name:', model.name)
print('Version:', model.version)
メソッド
deserialize |
JSON オブジェクトを ResourceConfiguration オブジェクトに変換します。 |
serialize |
JSON でシリアル化されたディレクトリにこの ResourceConfiguration を変換します。 |
deserialize
JSON オブジェクトを ResourceConfiguration オブジェクトに変換します。
static deserialize(payload_obj)
パラメーター
戻り値
指定された JSON オブジェクトの ResourceConfiguration 表現。
の戻り値の型 :
serialize
JSON でシリアル化されたディレクトリにこの ResourceConfiguration を変換します。
serialize()
戻り値
この ResourceConfiguration の JSON 表現。
の戻り値の型 :
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示