Skip to content

Commit

Permalink
change model name for nlp to use kebab-case model names instead of en…
Browse files Browse the repository at this point in the history
…um or snake_case (#2266)

Co-authored-by: Rehaan Bhimani <rbhimani@microsoft.com>
  • Loading branch information
Rehaan Bhimani and bhimar committed May 11, 2023
1 parent ed4da61 commit f4b2673
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
")"
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit f4b2673

Please sign in to comment.