RunDetails Class

Represents a Jupyter notebook widget used to view the progress of model training.

A widget is asynchronous and provides updates until training finishes.

Initialize widget with provided run instance.

Inheritance
builtins.object
RunDetails

Constructor

RunDetails(run_instance)

Parameters

Name Description
run_instance
Required
Run

Run instance for which the widget will be rendered.

run_instance
Required
Run

Run instance for which the widget will be rendered.

Remarks

An Azure ML Jupyter Notebook widget shows the progress of model training, including properties, logs, and metrics. The selected widget type is inferred implicitly from the run_instance. You don't need to set it explicitly. Use the show method to begin rendering of the widget. If the widget isn't installed, you'll instead see a link to view the content in a new browser page. After starting an experiment, you can also see the progress of model training in the Azure portal using the get_portal_url() method of the Run class.

The following example shows how to create a widget and start it:


   from azureml.widgets import RunDetails

   RunDetails(remote_run).show()

Full sample is available from https://github.com/Azure/MachineLearningNotebooks/blob/master/how-to-use-azureml/automated-machine-learning/classification-credit-card-fraud/auto-ml-classification-credit-card-fraud.ipynb

The following types of runs are supported:

  • StepRun: Shows run properties, output logs, metrics.

  • HyperDriveRun: Shows parent run properties, logs, child runs, primary metric chart, and parallel coordinate chart of hyperparameters.

  • AutoMLRun: Shows child runs and primary metric chart with option to select individual metrics.

  • PipelineRun: Shows running and non-running nodes of a pipeline along with graphical representation of nodes and edges.

  • ReinforcementLearningRun: Shows status of runs in real time. Azure Machine Learning Reinforcement Learning is currently a preview feature. For more information, see Reinforcement learning with Azure Marchine Learning.

The azureml-widgets package is installed when you install the Azure Machine Learning SDK. However, some further installation may be needed depending on environment.

  • Jupyter Notebooks: Both local and cloud notebooks are fully supported, with interactivity, async auto-updates, and non-blocking cell execution.

  • JupyterLab: Some further installation may be needed.

    1. Verify that the azure-widgets package is installed and if not, install it.

      
         sudo -i pip install azureml-widgets
      
    2. Install JupyterLab Extension.

      
         sudo -i jupyter labextension install @jupyter-widgets/jupyterlab-manager
      
    3. After installation, restart the kernel in all currently running notebooks.

      
         jupyter labextension list
      
  • Databricks: Partial support for Juypter Notebook widgets. When you use the widget, it will display a link to view the content in a new browser page. Use the show with the render_lib parameter set to 'displayHTML'.

Methods

get_widget_data

Retrieve and transform data from run history to be rendered by widget. Used also for debugging purposes.

show

Render widget and start thread to refresh the widget.

get_widget_data

Retrieve and transform data from run history to be rendered by widget. Used also for debugging purposes.

get_widget_data(widget_settings=None)

Parameters

Name Description
widget_settings

Settings to apply to the widget. Supported setting: 'debug' (a boolean).

Default value: None

Returns

Type Description

Dictionary containing data to be rendered by the widget.

show

Render widget and start thread to refresh the widget.

show(render_lib=None, widget_settings=None)

Parameters

Name Description
render_lib
<xref:func>

The library to use for rendering. Required only for Databricks with value 'displayHTML'.

Default value: None
widget_settings

Settings to apply to the widget. Supported setting: 'debug' (a boolean).

Default value: None