From d94c4e5e9f29d003ec6694d73c95d3ec4fa98327 Mon Sep 17 00:00:00 2001 From: Rehaan Bhimani Date: Thu, 11 May 2023 11:31:06 -0600 Subject: [PATCH] change model name for nlp to use kebab-case model names instead of enum or snake_case (#2266) Co-authored-by: Rehaan Bhimani --- ...cli-automl-text-ner-conll2003-distributed-sweeping.yml | 4 ++-- ...toml-nlp-text-ner-task-distributed-with-sweeping.ipynb | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cli/jobs/automl-standalone-jobs/cli-automl-text-ner-conll-distributed-sweeping/cli-automl-text-ner-conll2003-distributed-sweeping.yml b/cli/jobs/automl-standalone-jobs/cli-automl-text-ner-conll-distributed-sweeping/cli-automl-text-ner-conll2003-distributed-sweeping.yml index e98dbb900c..2f9cc83b25 100644 --- a/cli/jobs/automl-standalone-jobs/cli-automl-text-ner-conll-distributed-sweeping/cli-automl-text-ner-conll2003-distributed-sweeping.yml +++ b/cli/jobs/automl-standalone-jobs/cli-automl-text-ner-conll-distributed-sweeping/cli-automl-text-ner-conll2003-distributed-sweeping.yml @@ -37,10 +37,10 @@ sweep: search_space: - model_name: type: choice - values: [bert_base_cased, roberta_base] + values: [bert-base-cased, roberta-base] - model_name: type: choice - values: [distilroberta_base] + values: [distilroberta-base] weight_decay: type: uniform min_value: 0.01 diff --git a/sdk/python/jobs/automl-standalone-jobs/automl-nlp-text-named-entity-recognition-task-distributed-sweeping/automl-nlp-text-ner-task-distributed-with-sweeping.ipynb b/sdk/python/jobs/automl-standalone-jobs/automl-nlp-text-named-entity-recognition-task-distributed-sweeping/automl-nlp-text-ner-task-distributed-with-sweeping.ipynb index 8b20f2469c..b2acfa109d 100644 --- a/sdk/python/jobs/automl-standalone-jobs/automl-nlp-text-named-entity-recognition-task-distributed-sweeping/automl-nlp-text-ner-task-distributed-with-sweeping.ipynb +++ b/sdk/python/jobs/automl-standalone-jobs/automl-nlp-text-named-entity-recognition-task-distributed-sweeping/automl-nlp-text-ner-task-distributed-with-sweeping.ipynb @@ -54,7 +54,7 @@ "from azure.ai.ml import MLClient\n", "\n", "from azure.ai.ml import Input\n", - "from azure.ai.ml.constants import AssetTypes, NlpModels, NlpLearningRateScheduler\n", + "from azure.ai.ml.constants import AssetTypes, NlpLearningRateScheduler\n", "from azure.ai.ml.automl import SearchSpace\n", "from azure.ai.ml.sweep import Choice, Uniform, BanditPolicy\n", "\n", @@ -302,7 +302,7 @@ "\n", "# Pass the fixed parameters\n", "text_ner_job.set_training_parameters(\n", - " model_name=NlpModels.ROBERTA_BASE,\n", + " model_name=\"roberta-base\",\n", " learning_rate_scheduler=NlpLearningRateScheduler.LINEAR,\n", " warmup_ratio=0.1,\n", ")" @@ -402,10 +402,10 @@ "text_ner_job.extend_search_space(\n", " [\n", " SearchSpace(\n", - " model_name=Choice([NlpModels.BERT_BASE_CASED, NlpModels.ROBERTA_BASE]),\n", + " model_name=Choice([\"bert-base-cased\", \"roberta-base\"]),\n", " ),\n", " SearchSpace(\n", - " model_name=Choice([NlpModels.DISTILROBERTA_BASE]),\n", + " model_name=Choice([\"distilroberta-base\"]),\n", " weight_decay=Uniform(0.01, 0.1),\n", " ),\n", " ]\n",