qewton.optim.tuner package

Module contents

Subpackages

Submodules

qewton.optim.tuner.base module

qewton.optim.tuner.base.worker(trainer, device, tune_state: TuningState, task_queue, result_queue, stop_event)[source]
class qewton.optim.tuner.base.Tuner(trainer: Trainer, tuning_objectives: list, trial_number: int = 10, devices: str | list[str] = 'cpu', trials_per_device: int = 1, track_tune_state: bool | TuningState = True, tuning_callbacks: list[TuningCallback] | None = None, save_path: str = 'tuner', result_collector: TuneResultCollector = <qewton.optim.tuner.results.tune_results.TuneResultCollector object>, use_multiprocessing: bool = True)[source]

Bases: object

Base class for hyperparameter tuners.

Manages the execution of multiple training trials with different hyperparameters across various devices, and logs the results.

save_keys = ['Termination Reason', 'Training Time [s]', 'Save Path']
build_save_path(save_path: str, trainer: Trainer) → str[source]

Constructs a unique save path for the tuning results. :param trainer: A trainer instance to get its save_path. :type trainer: Trainer

Returns:

The unique file path for saving results.

Return type:

str

run()[source]
print_update_text(done_counter, len_trial_params)[source]

qewton.optim.tuner.optuna_tuner module