HyperDriveRunConfig Class
Configuration that defines a HyperDrive run.
Configuration includes information about parameter space sampling, termination policy, primary metric, estimator and the compute target to execute the experiment runs on.
Initialize the HyperDriveConfig.
- Inheritance
-
azureml.train.hyperdrive.runconfig.HyperDriveConfigHyperDriveRunConfig
Constructor
HyperDriveRunConfig(estimator, hyperparameter_sampling, primary_metric_name, primary_metric_goal, max_total_runs, max_concurrent_runs=None, max_duration_minutes=10080, policy=None)
Parameters
- primary_metric_goal
- PrimaryMetricGoal
One of maximize / minimize. It determines if the primary metric has to be minimized/maximized in the experiment runs' evaluation.
- max_total_runs
- int
Maximum number of runs. This is the upper bound; there may be fewer runs when the sample space is smaller than this value.
- max_concurrent_runs
- int
Maximum number of runs to run concurrently. If None, all runs are launched in parallel.
- max_duration_minutes
- int
Maximum duration of the hyperdrive run. Once this time is exceeded, the run is cancelled. The maximum duration of the child runs can be set with the ScriptRunConfig's "max_run_duration_seconds" argument.
- policy
- EarlyTerminationPolicy
The early termination policy to use. If None - the default, no early termination policy will be used. The MedianTerminationPolicy with delay_evaluation of 5 is a good termination policy to start with. These are conservative settings, that can provide 25%-35% savings with no loss on primary metric (based on our evaluation data).
- run_config
- ScriptRunConfig
An object for setting up configuration for script/notebook runs.
Specify only one of the following parameters: estimator
, run_config
,
or pipeline
.
- resume_from
- HyperDriveRun or list[HyperDriveRun]
A hyperdrive run or a list of hyperdrive runs that will be inherited as data points to warm start the new run.
A hyperdrive child run or a list of hyperdrive child runs that will be resumed as new child runs of the new hyperdrive run.
- pipeline
- Pipeline
A pipeline object for setting up configuration for pipeline runs.
The pipeline object will be called with the sample hyperparameters to submit pipeline runs.
Specify only one of the following parameters: estimator
, run_config
,
or pipeline
.
- hyperparameter_sampling
- HyperParameterSampling
The hyperparameter space sampling definition.
- primary_metric_goal
- PrimaryMetricGoal
Either PrimaryMetricGoal.MINIMIZE or PrimaryMetricGoal.MAXIMIZE. This parameter determines if the primary metric is to be minimized or maximized when evaluating runs.
- max_total_runs
- int
The maximum total number of runs to create. This is the upper bound; there may be fewer runs when the sample space is smaller than this value.
- max_concurrent_runs
- int
The maximum number of runs to execute concurrently. If None, all runs are launched in parallel.
- max_duration_minutes
- int
The maximum duration of the HyperDrive run. Once this time is exceeded, any runs still executing are cancelled.
- policy
- EarlyTerminationPolicy
The early termination policy to use. If None - the default, no early termination policy will be used.
The <xref:azureml.train.hyperdrive.MedianTerminationPolicy> with delay_evaluation
of 5
is a good termination policy to start with. These are conservative settings,
that can provide 25%-35% savings with no loss on primary metric (based on our evaluation data).
- estimator
- MMLBaseEstimator
An estimator that will be called with sampled hyper parameters.
Specify only one of the following parameters: estimator
, run_config
,
or pipeline
.
- run_config
- ScriptRunConfig
An object for setting up configuration for script/notebook runs.
Specify only one of the following parameters: estimator
, run_config
,
or pipeline
.
- resume_from
- HyperDriveRun | list[HyperDriveRun]
A hyperdrive run or a list of hyperdrive runs that will be inherited as data points to warm start the new run.
A hyperdrive child run or a list of hyperdrive child runs that will be resumed as new child runs of the new hyperdrive run.
- pipeline
- Pipeline
A pipeline object for setting up configuration for pipeline runs.
The pipeline object will be called with the sample hyperparameters to submit pipeline runs.
Specify only one of the following parameters: estimator
, run_config
,
or pipeline
.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for