Description Usage Arguments Value See Also Examples
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()
.
1 2 3 4 5 6 7 8 9 10 | 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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | ## Not run:
# 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)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.