aup.Proposer.HyperbandProposer

The code is based on hyperband github commit a632209.

See license for redistribution.

Configuration

General parameters

Name

Default value

Explanation

proposer

hyperband

random_seed

0

[Optional] seed for random generator

max_iter

81

Max iterations (e.g. epochs) per configuration

eta

3

downsampling rate, choose 3 for training from scratch

skip_last

0

whether skip last element

engine

random

engine to generate configurations for hyperband

Specific parameters for parameter_config

Name

Explanation

name

name of the variable, will be used in the job config, i.e. training code

type

type of the parameter to be sampled: choose from “float”,”int”,”choice”

range

range of the parameter. For “choice”, list all the feasible values

In the returned job_config, it has n_iterations and tid for tracking the HPO process. n_iterations marks how much resource should be allocated for this round of training (e.g. epochs); tid is used to recover the previous trained model if needed (i.e. finetune)

APIs

class HyperbandProposer(config)[source]

Bases: aup.Proposer.AbstractProposer.AbstractProposer

failed(job)[source]

Mark job as failed in proposer history.

Parameters

job (Job) – Failed job

get_param()[source]

Get new proposed parameter values

reload(path)[source]

Reload Proposer state from path

Parameters

path (str) – path to reload

save(path)[source]

Save Proposer state to path.

Some proposer can not generate new parameters after saving.

Parameters

path (str) – path to save

setup(s)[source]
static setup_config()[source]
update(score, job)[source]

Update scores in proposer history

Parameters
  • score (float) – score returned by Job

  • job (Job) – Finished job

verify_config(config)[source]

Verify the input configuration is enough for the proposer

Parameters

config (dict) – Experiment configuration of parameter_config

Returns

config

Return type

dict