Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,25 @@
" dsvm_compute.wait_for_completion(show_output = True)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Attach an existing Linux DSVM as a compute target\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
" '''\n",
" from azureml.core.compute import RemoteCompute \n",
" dsvm_compute = RemoteCompute.attach(ws,name=\"attach-from-sdk6\",username=<username>,address=<ipaddress>,ssh_port=22,password=<password>)\n",
"'''"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down
24 changes: 0 additions & 24 deletions automl/00.configuration.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -231,37 +231,13 @@
"print('Sample projects will be created in {}.'.format(sample_projects_folder))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Install additional packages for demo notebooks"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"!pip install pandas_ml\n",
"!pip install seaborn"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Success!\n",
"Great, you are ready to move on to the rest of the sample notebooks."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
5 changes: 1 addition & 4 deletions automl/01.auto-ml-classification.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
"from matplotlib.pyplot import imshow\n",
"import numpy as np\n",
"import pandas as pd\n",
"import seaborn as sns\n",
"from sklearn import datasets\n",
"\n",
"import azureml.core\n",
Expand Down Expand Up @@ -268,9 +267,7 @@
" metricslist[int(properties['iteration'])] = metrics\n",
"\n",
"rundata = pd.DataFrame(metricslist).sort_index(1)\n",
"cm = sns.light_palette(\"lightgreen\", as_cmap = True)\n",
"s = rundata.style.background_gradient(cmap = cm)\n",
"s"
"rundata"
]
},
{
Expand Down
7 changes: 1 addition & 6 deletions automl/02.auto-ml-regression.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
"from matplotlib.pyplot import imshow\n",
"import numpy as np\n",
"import pandas as pd\n",
"import seaborn as sns\n",
"from sklearn import datasets\n",
"\n",
"import azureml.core\n",
Expand Down Expand Up @@ -248,12 +247,8 @@
" metrics = {k: v for k, v in run.get_metrics().items() if isinstance(v, float)} \n",
" metricslist[int(properties['iteration'])] = metrics\n",
" \n",
"import pandas as pd\n",
"import seaborn as sns\n",
"rundata = pd.DataFrame(metricslist).sort_index(1)\n",
"cm = sns.light_palette(\"lightgreen\", as_cmap = True)\n",
"s = rundata.style.background_gradient(cmap = cm)\n",
"s"
"rundata"
]
},
{
Expand Down
69 changes: 18 additions & 51 deletions automl/03.auto-ml-remote-execution.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
"from matplotlib.pyplot import imshow\n",
"import numpy as np\n",
"import pandas as pd\n",
"import seaborn as sns\n",
"from sklearn import datasets\n",
"\n",
"import azureml.core\n",
Expand Down Expand Up @@ -143,50 +142,6 @@
" dsvm_compute.wait_for_completion(show_output = True)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Create a RunConfiguration with DSVM name\n",
"Run the below code to tell the runconfiguration the name of your dsvm."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from azureml.core.runconfig import RunConfiguration\n",
"\n",
"run_config = RunConfiguration()\n",
"run_config.target = dsvm_compute"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Change index to use master packages\n",
"If you want to use master rather than preview run the below code. Once Public preview is launched we would not need this cell."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from azureml.core.runconfig import CondaDependencies\n",
"\n",
"cd = CondaDependencies()\n",
"\n",
"cd.remove_pip_option(pip_option=\"--index-url https://azuremlsdktestpypi.azureedge.net/sdk-release/Preview/E7501C02541B433786111FE8E140CAA1\")\n",
"cd.set_pip_index_url(index_url=\"--extra-index-url https://azuremlsdktestpypi.azureedge.net/sdk-release/master/588E708E0DF342C4A80BD954289657CF\")\n",
"\n",
"run_config.environment.python.conda_dependencies = cd"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -263,20 +218,27 @@
"\n",
"automl_config = AutoMLConfig(task = 'classification',\n",
" debug_log = 'automl_errors.log',\n",
" path=project_folder,\n",
" run_configuration = run_config,\n",
" path=project_folder, \n",
" compute_target = dsvm_compute,\n",
" data_script = project_folder + \"./get_data.py\",\n",
" **automl_settings\n",
" )\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<b>Note</b> that the first run on a new DSVM may take a several minutes to preparing the environment."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"remote_run = experiment.submit(automl_config, show_output=True)"
"remote_run = experiment.submit(automl_config, show_output=False)"
]
},
{
Expand Down Expand Up @@ -352,9 +314,7 @@
" metricslist[int(properties['iteration'])] = metrics\n",
"\n",
"rundata = pd.DataFrame(metricslist).sort_index(1)\n",
"cm = sns.light_palette(\"lightgreen\", as_cmap = True)\n",
"s = rundata.style.background_gradient(cmap = cm)\n",
"s"
"rundata"
]
},
{
Expand Down Expand Up @@ -504,6 +464,13 @@
" plt.imshow(images[index], cmap=plt.cm.gray_r, interpolation='nearest')\n",
" plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
Loading