Parallelized Tuner

class deepobs.tuner.tuner.ParallelizedTuner(optimizer_class, hyperparam_names, ressources, runner)[source]

Bases: deepobs.tuner.tuner.Tuner

The base class for all tuning methods which are uninformed and parallelizable, like Grid Search and Random Search.

generate_commands_script(testproblem, run_script, output_dir='./results', random_seed=42, generation_dir='./command_scripts', **kwargs)[source]
Parameters:
  • testproblem (str) -- Testproblem for which to generate commands.
  • run_script (str) -- Name the run script that is used from the command line.
  • output_dir (str) -- The output path where the execution results are written to.
  • random_seed (int) -- The random seed for the tuning.
  • generation_dir (str) -- The path to the directory where the generated scripts are written to.
Returns:

The relative file path to the generated commands script.

Return type:

str

generate_commands_script_for_testset(testset, *args, **kwargs)[source]

Generates command scripts for a whole testset. :param testset: A list of the testproblem strings. :type testset: list

tune(testproblem, output_dir='./results', random_seed=42, rerun_best_setting=False, **kwargs)[source]

Tunes the optimizer on the test problem. :param testproblem: The test problem to tune the optimizer on. :type testproblem: str :param output_dir: The output directory for the results. :type output_dir: str :param random_seed: Random seed for the whole truning process. Every individual run is seeded by it. :type random_seed: int :param rerun_best_setting: Whether to automatically rerun the best setting with 10 different seeds. :type rerun_best_setting: bool

tune_on_testset(testset, *args, **kwargs)

Tunes the hyperparameter on a whole testset. :param testset: A list of testproblems. :type testset: list