API References
HyperTuning.BCAPSampler
HyperTuning.BudgetExceeded
HyperTuning.GridSampler
HyperTuning.GroupedTrial
HyperTuning.MedianPruner
HyperTuning.NoMoreTrials
HyperTuning.RandomSampler
HyperTuning.Scenario
HyperTuning.StatusHyperTuning
HyperTuning.:..
HyperTuning.all_instances_succeeded
HyperTuning.best_parameters
HyperTuning.budget_exceeded
HyperTuning.default_rng_ht
HyperTuning.get_convergence
HyperTuning.get_instance
HyperTuning.history
HyperTuning.optimize
HyperTuning.optimize!
HyperTuning.parameters
HyperTuning.report_success!
HyperTuning.report_value!
HyperTuning.save_trials!
HyperTuning.should_prune
HyperTuning.top_parameters
HyperTuning.update_best_trial!
HyperTuning.@suggest
HyperTuning.BCAPSampler
— MethodBCAPSampler(searchspace;rng)
Define a iterator for the BCAP sampler.
HyperTuning.BudgetExceeded
— TypeBudgetExceeded([msg])
Used to inform if budget has been exceeded.
HyperTuning.GridSampler
— MethodGridSampler(;npartitions)
Define a iterator for the grid sampler.
HyperTuning.GroupedTrial
— TypeGroupedTrial
Trials grouped per instance.
HyperTuning.MedianPruner
— TypeMedianPruner(;start_after, prune_after)
- start_after: Start up pruner after this number (of completed trials).
- prune_after: Prune a trial after this value (considering the median criteria).
- median_vals: median values reported for each instance.
HyperTuning.NoMoreTrials
— TypeNoMoreTrials()
Used to inform that ampler refuses to suggest trials.
HyperTuning.RandomSampler
— MethodRandomSampler(;seed, rng)
Define a iterator for the random sampler.
HyperTuning.Scenario
— MethodScenario(;
parameters...,
sampler = default_sampler(),
pruner = default_pruner(),
instances = [1],
max_trials = :auto,
max_evals = :auto,
max_time = :auto,
verbose = false,
batch_size = max(nprocs(), Sys.CPU_THREADS),
)
Define an Scenario with parameters, and budget.
sampler
sampler to be used.pruner
pruner to reduce computational cost.instances
array (iterator) containing the problem instances.max_trials
maximum number of trials to be evaluated onoptimize
.max_evals
maximum number of function evaluations.max_time
maximum execution time onoptimize
.verbose
show message during the optimization.batch_size
number of trials evaluated for each instance for each iteration.
HyperTuning.StatusHyperTuning
— TypeStatusHyperTuning
Current status of the optimize process for scenario.
HyperTuning.:..
— MethodHyperTuning.all_instances_succeeded
— Methodall_instances_succeeded(scenario)
Check if all instances are successfully solved.
See also report_success
HyperTuning.best_parameters
— Methodbest_parameters(scenario)
Return best parameters saved in scenario.
HyperTuning.budget_exceeded
— Methodbudget_exceeded(scenario)
Check whether if budget is not exceeded.
HyperTuning.default_rng_ht
— Functiondefault_rng_ht(seed)
Default random number generator in HyperTuning.
HyperTuning.get_convergence
— Methodget_convergence(scenario)
Return vector of tuples containing the trial id and objective value.
HyperTuning.get_instance
— Methodget_instance(trial)
Get instance problem which trials has to be evaluated.
HyperTuning.history
— Methodhistory(scenario)
Return all evaluated trails.
HyperTuning.optimize!
— Methodoptimize!(f, scenario)
Perform an iteration of the optimization process.
When this function is called, scenario.batch_size
trials are sampled and evaluated, then update the sampler and pruner.
See also optimize
HyperTuning.optimize
— Methodoptimize(f, scenario)
Optimize f on provided scenario while the budget is not exceeded (limited by maxtrials, maxevals, etc).
See also optimize!
HyperTuning.parameters
— Methodparameters(hyperparameters...)
Define hyperparameters.
HyperTuning.report_success!
— Methodreport_success!(trial)
Report that the trial successfully solved the instance.
HyperTuning.report_value!
— Methodreport_value!(trial, value)
Report (to the pruner) evaluated value at trail.
HyperTuning.save_trials!
— Methodsave_trials!(ungrouped_trials, scenario)
Save evaluated trials into scenario history, then update best trial found so far. Also, report values to the sampler.
HyperTuning.should_prune
— Methodshould_prune(trial)
Check whether trial should be pruned.
HyperTuning.top_parameters
— Methodtop_parameters(scenario; ignore_pruned)
Return an array of trade-off trials (regarding success, mean objective value, time, etc).
HyperTuning.update_best_trial!
— Methodupdate_best_trial!(scenario, trials)
Update best trial found so far.
HyperTuning.@suggest
— Macro@suggest x in trial
Return a value for x stored in the sampled trial.