ScriptRun Class

Provides programmatic access for managing submitted training runs.

A run submitted with ScriptRunConfig represents a single trial in an experiment. Submitting the run returns a ScriptRun object, which can be used to monitor the asynchronous execution of the run, log metrics and store output of the run, and analyze results and access artifacts generated by the run.

To get started with experiments and ScriptRunConf, see

Class ScriptRun constructor.

Inheritance
ScriptRun

Constructor

ScriptRun(experiment, run_id, directory=None, _run_config=None, **kwargs)

Parameters

experiment
Experiment
Required

The experiment object.

run_id
str
Required

The run ID.

directory
str
default value: None

The source directory.

_run_config
RunConfiguration
default value: None

A run configuration.

kwargs
dict
Required

A dictionary of additional configuration parameters.

Remarks

The Azure Machine Learning SDK provides you with a series of interconnected classes, that are designed to help you train and compare machine learning models that are related by the shared problem that they are solving.

An Experiment acts as a logical container for these training runs. A RunConfiguration object is used to codify the information necessary to submit a training run in an experiment. A ScriptRunConfig object is a helper class that packages the RunConfiguration object with an execution script for training; see the python code example in the documentation for RunConfiguration for an example of a ScriptRunConfig object in action.

A ScriptRunConfig object is used to submit a training run as part of an Experiment. When a training run is submitted using a ScriptRunConfig object, the submit method returns an object of type ScriptRun.

A ScriptRun object gives you programmatic access to information about the associated training run. Some examples include retrieving the logs corresponding to a run, canceling a run if it's still in progress, cleaning up the artifacts of a completed run, and waiting for completion of a run currently in progress.

Methods

cancel

Cancel the ongoing run.

cancel

Cancel the ongoing run.

cancel()

Attributes

RUN_TYPE

RUN_TYPE = 'azureml.scriptrun'