OptunaSampler
Visitor that walks a generated sweep config, samples values with an Optuna trial, and returns a patch you can merge onto a base config. Reach for this when running hyperparameter studies without changing your train function.
Bases: SweepSampler[TBaseModel]
A sampler that uses Optuna for hyperparameter optimization.
Parameters:
-
trial(Trial) –The optuna trial to use for hyperparameter optimization.
__init__
Initialize the OptunaSampler.
Parameters:
-
trial(Trial) –The optuna trial to use for hyperparameter optimization.