ResourceConfiguration Osztály
Meghatározza az Azure Machine Learning-erőforrások erőforrás-konfigurációjának részleteit.
Inicializálja a ResourceConfiguration paramétert.
- Öröklődés
-
builtins.objectResourceConfiguration
Konstruktor
ResourceConfiguration(cpu=None, memory_in_gb=None, gpu=None)
Paraméterek
- cpu
- float
Az erőforráshoz lefoglalandó CPU-magok száma. Tizedes tört is lehet.
- memory_in_gb
- float
Az erőforráshoz lefoglalandó memória mennyisége (GB-ban). Tizedes tört is lehet.
- memory_in_gb
- float
Az erőforráshoz lefoglalandó memória mennyisége (GB-ban). Tizedes tört is lehet.
Megjegyzések
Inicializáljon egy erőforrás-konfigurációt ezzel az osztálysal. Az alábbi kód például bemutatja, hogyan regisztrálhat egy keretrendszert, bemeneti és kimeneti adatkészleteket, valamint erőforrás-konfigurációt meghatározó modellt.
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)
Metódusok
deserialize |
JSON-objektum konvertálása ResourceConfiguration objektummá. |
serialize |
Konvertálja ezt a ResourceConfiguration-t szerializált JSON-szótárlá. |
deserialize
JSON-objektum konvertálása ResourceConfiguration objektummá.
static deserialize(payload_obj)
Paraméterek
Válaszok
A megadott JSON-objektum ResourceConfiguration ábrázolása.
Visszatérési típus
serialize
Konvertálja ezt a ResourceConfiguration-t szerializált JSON-szótárlá.
serialize()
Válaszok
A ResourceConfiguration JSON-reprezentációja.
Visszatérési típus
Visszajelzés
https://aka.ms/ContentUserFeedback.
Hamarosan elérhető: 2024-ben fokozatosan kivezetjük a GitHub-problémákat a tartalom visszajelzési mechanizmusaként, és lecseréljük egy új visszajelzési rendszerre. További információ:Visszajelzés küldése és megtekintése a következőhöz: