Quickstart: Use your own notebook server to get started with Azure Machine Learning
In this article, you use your own notebook server to run code that is logged in the Azure Machine Learning service workspace. The workspace is the foundational block in the cloud that you use to experiment, train, and deploy machine learning models with Machine Learning.
This quickstart uses your own Python environment and Jupyter Notebook Server. For a quickstart with no installation, see Quickstart: Use a cloud-based notebook server to get started with Azure Machine Learning
View a video version of this quickstart:
In this quickstart, you:
- Write code that logs values inside the workspace.
- View the logged values in your workspace.
If you don’t have an Azure subscription, create a free account before you begin. Try the free or paid version of Azure Machine Learning service today.
- A Python 3.6 notebook server with the Azure Machine Learning SDK installed
- An Azure Machine Learning service workspace
- A workspace configuration file (aml_config/config.json ).
Get all these prerequisites from Create an Azure Machine Learning service workspace.
Use the workspace
Create a script or start a notebook in the same directory as your workspace configuration file. Run this code that uses the basic APIs of the SDK to track experiment runs.
- Create an experiment in the workspace.
- Log a single value into the experiment.
- Log a list of values into the experiment.
from azureml.core import Experiment # Create a new experiment in your workspace. exp = Experiment(workspace=ws, name='myexp') # Start a run and start the logging service. run = exp.start_logging() # Log a single number. run.log('my magic number', 42) # Log a list (Fibonacci numbers). run.log_list('my list', [1, 1, 2, 3, 5, 8, 13, 21, 34, 55]) # Finish the run. run.complete()
View logged results
When the run finishes, you can view the experiment run in the Azure portal. To print a URL that navigates to the results for the last run, use the following code:
Use the link to view the logged values in the Azure portal in your browser.
Clean up resources
You can use the resources you've created here as prerequisites to other Machine Learning tutorials and how-to articles.
If you don't plan to use the resources that you created in this article, delete them to avoid incurring any charges.
In this article, you created the resources you need to experiment with and deploy models. You ran code in a notebook, and you explored the run history for the code in your workspace in the cloud.
We'd love to hear your thoughts. Choose the type you'd like to provide:
Our feedback system is built on GitHub Issues. Read more on our blog.