aup.Proposer.HyperoptProposer

This is converted from Hyperopt repo commit 762e89f

Configuration

General parameters

Name

Default value

Explanation

proposer

hyperopt

random_seed

0

[Optional] seed for random generator

engine

tpe

engine to generate configurations for HyperOpt

n_samples

max_evals in hyperopt

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

APIs

class HyperoptProposer(config, random_seed=0)[source]

Bases: aup.Proposer.AbstractProposer.AbstractProposer

failed(job)[source]

Failed jobs unsupported by Hyperopt Proposer.

Parameters

job (Job) – Failed job, containing job id

get_param(**kwargs)[source]

Restructure of hyperopt.fmin run(), serial_evaluate().

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

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

Restructure of hyperopt.fmin serial_evaluation.

Parameters
  • score – score returned from the training script

  • job – job object contains tid for hyperopt internal update

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