The HyperDrive configuration includes information about hyperparameter space sampling, termination policy, primary metric, estimator, and the compute target to execute the experiment runs on.
To submit the HyperDrive experiment, pass the HyperDriveConfig
object
returned from this method to submit_experiment()
.
hyperdrive_config( hyperparameter_sampling, primary_metric_name, primary_metric_goal, max_total_runs, max_concurrent_runs = NULL, max_duration_minutes = 10080L, policy = NULL, estimator = NULL )
hyperparameter_sampling | The hyperparameter sampling space.
Can be a |
---|---|
primary_metric_name | A string of the name of the primary metric reported by the experiment runs. |
primary_metric_goal | The |
max_total_runs | An integer of 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. If both |
max_concurrent_runs | An integer of the maximum number of runs to
execute concurrently. If |
max_duration_minutes | An integer of the maximum duration of the
HyperDrive run. Once this time is exceeded, any runs still executing are
cancelled. If both |
policy | The early termination policy to use. Can be either a
The |
estimator | The |
The HyperDriveConfig
object.
submit_experiment()
if (FALSE) { # Load the workspace ws <- load_workspace_from_config() # Get the compute target compute_target <- get_compute(ws, cluster_name = 'mycluster') # Define the primary metric goal goal = primary_metric_goal("MAXIMIZE") # Define the early termination policy early_termination_policy = median_stopping_policy(evaluation_interval = 1L, delay_evaluation = 5L) # Create the estimator est <- estimator(source_directory = '.', entry_script = 'train.R', compute_target = compute_target) # Create the HyperDrive configuration hyperdrive_run_config = hyperdrive_config( hyperparameter_sampling = param_sampling, primary_metric_name = 'accuracy', primary_metric_goal = goal, max_total_runs = 100, max_concurrent_runs = 4, policy = early_termination_policy, estimator = est) # Submit the HyperDrive experiment exp <- experiment(ws, name = 'myexperiment') run = submit_experiment(exp, hyperdrive_run_config) }