You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
external or internal objective function evaluation by a scheduler, also compatible with Slurm,
real-time visualisation of results in Tensorboard
via the HParams plugin.
For the full set of features refer to the documentation.
Quick start
Define the objective function to optimise. For example, it can take the hyperparameters params as input and
return a raw value score as output:
importhypertunityashtdeffoo(**params) ->float:
# do some very costly computations
...
returnscore
To define the valid ranges for the values of params we create a Domain object:
domain=ht.Domain({
"x": [-10., 10.], # continuous variable within the interval [-10., 10.]"y": {"opt1", "opt2"}, # categorical variable from the set {"opt1", "opt2"}"z": set(range(4)) # discrete variable from the set {0, 1, 2, 3}
})
Then we set up the optimiser:
bo=ht.BayesianOptimisation(domain=domain)
And we run the optimisation for 10 steps. Each result is used to update the optimiser so that informed domain
samples are drawn:
n_steps=10foriinrange(n_steps):
samples=bo.run_step(batch_size=2, minimise=True) # suggest next samplesevaluations= [foo(**s.as_dict()) forsinsamples] # evaluate foobo.update(samples, evaluations) # update the optimiser