Skip to content

Commit

Permalink
Jeffshep/fixbankmarketing (#2728)
Browse files Browse the repository at this point in the history
Fix the automl-classification-task-bankmarketing.ipynb sample notebook to work in the case were a new curated environment is being tested.
  • Loading branch information
jeff-shepherd authored Oct 13, 2023
1 parent ebf855a commit feb9ddf
Showing 1 changed file with 24 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"gather": {
"logged": 1634852261744
},
Expand Down Expand Up @@ -256,6 +257,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"gather": {
"logged": 1634852262026
},
Expand Down Expand Up @@ -314,6 +316,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"gather": {
"logged": 1634852267930
},
Expand Down Expand Up @@ -936,6 +939,26 @@
"print(\"Artifacts: {}\".format(os.listdir(local_path)))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Find the curated environment used for training\n",
"\n",
"import yaml\n",
"\n",
"model_file = os.path.join(local_dir, \"outputs\", \"mlflow-model\", \"MLmodel\")\n",
"\n",
"with open(model_file, \"r\") as model_stream:\n",
" model_yaml = yaml.safe_load(model_stream)\n",
" training_environment_name = (\n",
" \"AzureML-AutoML:\" + model_yaml[\"metadata\"][\"azureml.base_image\"].split(\":\")[-1]\n",
" )\n",
" print(\"Training emvironment {}\".format(training_environment_name))"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand All @@ -955,7 +978,7 @@
" code=\"./artifact_downloads/outputs/generated_code/\",\n",
" command=command_str,\n",
" tags=dict(automl_child_run_id=best_run.info.run_id),\n",
" environment=\"AzureML-AutoML@latest\",\n",
" environment=training_environment_name,\n",
" compute=compute_name,\n",
" experiment_name=exp_name,\n",
")\n",
Expand Down

0 comments on commit feb9ddf

Please sign in to comment.