This commit is contained in:
Marvin Buss 2020-03-25 23:18:38 +01:00
Родитель 38b4c67799
Коммит b2aa20d559
2 изменённых файлов: 11 добавлений и 11 удалений

Просмотреть файл

@ -2,25 +2,25 @@ name: "Azure Machine Learning Register Model Action"
description: "Register a model in your Azure Machine Learning Workspace with this GitHub Action"
author: "azure/gh-aml"
inputs:
azureCredentials:
azure_credentials:
description: "Paste output of `az ad sp create-for-rbac --name <your-sp-name> --role contributor --scopes /subscriptions/<your-subscriptionId>/resourceGroups/<your-rg> --sdk-auth` as value of secret variable: AZURE_CREDENTIALS"
required: true
runId:
run_id:
description: "ID of the run or pipeline run for which a model is to be registered"
required: true
experimentName:
experiment_name:
description: "Experiment to which the run belongs to"
required: true
parametersFile:
parameters_file:
description: "JSON file including the parameters for registering the model."
required: true
default: "registermodel.json"
outputs:
modelName:
model_name:
description: "Name of the registered model"
modelVersion:
model_version:
description: "Version of the registered model"
modelId:
model_id:
description: "ID of the registered model"
branding:
icon: "chevron-up"

Просмотреть файл

@ -14,10 +14,10 @@ from utils import AMLConfigurationException, required_parameters_provided, get_m
def main():
# Loading input values
print("::debug::Loading input values")
parameters_file = os.environ.get("INPUT_PARAMETERSFILE", default="run.json")
azure_credentials = os.environ.get("INPUT_AZURECREDENTIALS", default="{}")
experiment_name = os.environ.get("INPUT_EXPERIMENTNAME", default=None)
run_id = os.environ.get("INPUT_RUNID", default=None)
parameters_file = os.environ.get("INPUT_PARAMETERS_FILE", default="run.json")
azure_credentials = os.environ.get("INPUT_AZURE_CREDENTIALS", default="{}")
experiment_name = os.environ.get("INPUT_EXPERIMENT_NAME", default=None)
run_id = os.environ.get("INPUT_RUN_ID", default=None)
try:
azure_credentials = json.loads(azure_credentials)
except JSONDecodeError: