Quickstart: Use your own notebook server to get started with Azure Machine Learning

Use your own notebook server to run code that logs values 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 SDK installation, see Quickstart: Use a cloud-based notebook server to get started with Azure Machine Learning

View a video version of this quickstart:

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 (.azureml/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.

  1. Create an experiment in the workspace.
  2. Log a single value into the experiment.
  3. 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.

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:


This code returns a link you can use to view the logged values in the Azure portal in your browser.

Logged values in the Azure portal

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.


Next steps

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.

You can also explore more advanced examples on GitHub or view the SDK user guide.