Build a machine learning environment using Jupyter notebooks on Azure Machine Learning It is a summary of the methods for.
It is assumed that Azure Machine Learning Studio and Jupyter notebooks can be started. Use Anaconda to build and switch virtual environments.
A collection of Python packages for data science
--Supports over 1,500 packages
--Supports both GUI and command line
--Can be operated using the conda
command
By using Anaconda, it is possible to easily build and switch the development environment without taking time to install the library.
Reference: https://www.creativevillage.ne.jp/72837
Follow the steps below in Terminal on Jupyter.
$ conda create --name my_notebook_env python=3.7 -y
-name my_notebook_env
: The name of the virtual environment. You can set whatever you like.
python = 3.7
: Python version used in the virtual environment
-y
: Automatically respond to confirmation items with yes
jupyter kernelspec list
$ conda activate my_notebook_env
conda deactivate
Install the Azure Machine Learning SDK for Python.
$ pip install --upgrade azureml-sdk[explain,automl,interpret,notebooks]
See below for details on the installed components. Azure Machine Learning SDK for Python
Execute the following command with the virtual environment activated.
$ ipython kernel install --user --name=my_notebook_env --display-name=my_notebook_env
--user
: Installed in the current user environment
--name
: Specify the name of the kernel
--display-name
: The display name of the kernel. This time, it is the same as the kernel name, but you can set an easy-to-understand display name here.
jupyter kernelspec list
jupyter kernelspec uninstall my_notebook_env
In order to reflect the change, if there is an open node book, reload it by reloading the browser.
Select Kernel → Change kernel on the node book, and select the virtual environment (my_notebook_env) created this time.
It is successful if the display on the upper right of the node book screen is switched correctly.
You can easily build and switch the development environment by using Anaconda. By using Azure Machine Learning, you can perform machine learning in the familiar Jupyter environment.
What is Azure Machine Learning Azure Machine Learning SDK for Python Easy usage memo of Anaconda (conda)
Recommended Posts