Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 34 additions & 1 deletion sdk/python/using-mlflow/model-management/model_management.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,15 @@
"mlflow.set_tracking_uri(azureml_tracking_uri)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"> **Note:** The MLflow tracking URI is an API endpoint for the Azure Machine Learning tracking server. ",
"Azure Machine Learning does not expose a MLflow UI at this address. ",
"To view your experiments and runs, use [Azure ML Studio](https://ml.azure.com) instead."
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -192,6 +201,30 @@
"print(last_run.info.run_id)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import re\n",
"\n",
"# Construct the Azure ML Studio URL to view this run\n",
"tracking_uri = mlflow.get_tracking_uri()\n",
"match = re.search(\n",
" r\"subscriptions/([^/]+)/resourceGroups/([^/]+)/providers/Microsoft\\.MachineLearningServices/workspaces/([^/?]+)\",\n",
" tracking_uri,\n",
" re.IGNORECASE,\n",
")\n",
"if match:\n",
" sub, rg, ws_name = match.groups()\n",
" studio_url = (\n",
" f\"https://ml.azure.com/runs/{last_run.info.run_id}\"\n",
" f\"?wsid=/subscriptions/{sub}/resourcegroups/{rg}/workspaces/{ws_name}\"\n",
" )\n",
" print(f\"View this run in Azure ML Studio:\\n{studio_url}\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -626,4 +659,4 @@
},
"nbformat": 4,
"nbformat_minor": 4
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,45 @@
"mlflow.end_run()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"> **Note:** Azure Machine Learning uses MLflow as a compatible tracking server but does not expose a MLflow UI. ",
"To view your experiments and runs, use [Azure ML Studio](https://ml.azure.com) instead. ",
"You can get the direct link to the run using the code below."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import re\n",
"\n",
"# Construct the Azure ML Studio URL to view this run\n",
"# AzureML does not serve a MLflow UI - use Azure ML Studio to view your runs\n",
"tracking_uri = mlflow.get_tracking_uri()\n",
"match = re.search(\n",
" r\"subscriptions/([^/]+)/resourceGroups/([^/]+)/providers/Microsoft\\.MachineLearningServices/workspaces/([^/?]+)\",\n",
" tracking_uri,\n",
" re.IGNORECASE,\n",
")\n",
"if match:\n",
" sub, rg, ws_name = match.groups()\n",
" studio_url = (\n",
" f\"https://ml.azure.com/runs/{run.info.run_id}\"\n",
" f\"?wsid=/subscriptions/{sub}/resourcegroups/{rg}/workspaces/{ws_name}\"\n",
" )\n",
" print(f\"View this run in Azure ML Studio:\\n{studio_url}\")\n",
"else:\n",
" print(f\"Run ID: {run.info.run_id}\")\n",
" print(\n",
" \"To view this run, navigate to Azure ML Studio (https://ml.azure.com) and find your experiment.\"\n",
" )"
]
},
{
"attachments": {},
"cell_type": "markdown",
Expand Down Expand Up @@ -526,4 +565,4 @@
},
"nbformat": 4,
"nbformat_minor": 4
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,45 @@
"mlflow.end_run()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"> **Note:** Azure Machine Learning uses MLflow as a compatible tracking server but does not expose a MLflow UI. ",
"To view your experiments and runs, use [Azure ML Studio](https://ml.azure.com) instead. ",
"You can get the direct link to the run using the code below."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import re\n",
"\n",
"# Construct the Azure ML Studio URL to view this run\n",
"# AzureML does not serve a MLflow UI - use Azure ML Studio to view your runs\n",
"tracking_uri = mlflow.get_tracking_uri()\n",
"match = re.search(\n",
" r\"subscriptions/([^/]+)/resourceGroups/([^/]+)/providers/Microsoft\\.MachineLearningServices/workspaces/([^/?]+)\",\n",
" tracking_uri,\n",
" re.IGNORECASE,\n",
")\n",
"if match:\n",
" sub, rg, ws_name = match.groups()\n",
" studio_url = (\n",
" f\"https://ml.azure.com/runs/{run.info.run_id}\"\n",
" f\"?wsid=/subscriptions/{sub}/resourcegroups/{rg}/workspaces/{ws_name}\"\n",
" )\n",
" print(f\"View this run in Azure ML Studio:\\n{studio_url}\")\n",
"else:\n",
" print(f\"Run ID: {run.info.run_id}\")\n",
" print(\n",
" \"To view this run, navigate to Azure ML Studio (https://ml.azure.com) and find your experiment.\"\n",
" )"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -698,4 +737,4 @@
},
"nbformat": 4,
"nbformat_minor": 4
}
}
33 changes: 32 additions & 1 deletion sdk/python/using-mlflow/train-and-log/xgboost_nested_runs.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,37 @@
"![](assets/hyperopt_child.png)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import re\n",
"\n",
"# Construct the Azure ML Studio URL to view the parent run\n",
"# AzureML does not serve a MLflow UI - use Azure ML Studio to view your runs\n",
"hyperopt_run = mlflow.last_active_run()\n",
"tracking_uri = mlflow.get_tracking_uri()\n",
"match = re.search(\n",
" r\"subscriptions/([^/]+)/resourceGroups/([^/]+)/providers/Microsoft\\.MachineLearningServices/workspaces/([^/?]+)\",\n",
" tracking_uri,\n",
" re.IGNORECASE,\n",
")\n",
"if match:\n",
" sub, rg, ws_name = match.groups()\n",
" studio_url = (\n",
" f\"https://ml.azure.com/runs/{hyperopt_run.info.run_id}\"\n",
" f\"?wsid=/subscriptions/{sub}/resourcegroups/{rg}/workspaces/{ws_name}\"\n",
" )\n",
" print(f\"View this run in Azure ML Studio:\\n{studio_url}\")\n",
"else:\n",
" print(f\"Run ID: {hyperopt_run.info.run_id}\")\n",
" print(\n",
" \"To view this run, navigate to Azure ML Studio (https://ml.azure.com) and find your experiment.\"\n",
" )"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -952,4 +983,4 @@
},
"nbformat": 4,
"nbformat_minor": 4
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
"source": [
"import mlflow\n",
"\n",
"mlflow.set_tracking_uri = ws.mlflow_tracking_uri\n",
"mlflow.set_tracking_uri(ws.mlflow_tracking_uri)\n",
"mlflow.set_experiment(experiment_name=\"heart-condition-classifier\")"
]
},
Expand Down Expand Up @@ -372,6 +372,45 @@
"mlflow.end_run()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"> **Note:** Azure Machine Learning uses MLflow as a compatible tracking server but does not expose a MLflow UI. ",
"To view your experiments and runs, use [Azure ML Studio](https://ml.azure.com) instead. ",
"You can get the direct link to the run using the code below."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import re\n",
"\n",
"# Construct the Azure ML Studio URL to view this run\n",
"# AzureML does not serve a MLflow UI - use Azure ML Studio to view your runs\n",
"tracking_uri = mlflow.get_tracking_uri()\n",
"match = re.search(\n",
" r\"subscriptions/([^/]+)/resourceGroups/([^/]+)/providers/Microsoft\\.MachineLearningServices/workspaces/([^/?]+)\",\n",
" tracking_uri,\n",
" re.IGNORECASE,\n",
")\n",
"if match:\n",
" sub, rg, ws_name = match.groups()\n",
" studio_url = (\n",
" f\"https://ml.azure.com/runs/{run.info.run_id}\"\n",
" f\"?wsid=/subscriptions/{sub}/resourcegroups/{rg}/workspaces/{ws_name}\"\n",
" )\n",
" print(f\"View this run in Azure ML Studio:\\n{studio_url}\")\n",
"else:\n",
" print(f\"Run ID: {run.info.run_id}\")\n",
" print(\n",
" \"To view this run, navigate to Azure ML Studio (https://ml.azure.com) and find your experiment.\"\n",
" )"
]
},
{
"attachments": {},
"cell_type": "markdown",
Expand Down Expand Up @@ -524,4 +563,4 @@
},
"nbformat": 4,
"nbformat_minor": 4
}
}
Loading