aup.Proposer.SpearmintProposer

Re-implementation of Spearmint. Most of the Spearmint code has not been changed Mainly wrap main.py

Be aware - all variables are vectorized except size=1 case. (different from spearmint original implementation)

The original source is forked from Spearmint github commit 70309f0.

Configuration

General parameters

Name

Default value

Explanation

proposer

spearmint

engine

GPEIOptChooser

engine_config

Options for spearmint chooser

grid_size

20000

Option for spearmint

n_samples

Total number of trials to sample

random_seed

0

[Optional] seed for random generator

spearmint_dir

spearmint

Spearmint working directory

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 SpearmintProposer(config)[source]

Bases: aup.Proposer.AbstractProposer.AbstractProposer

failed(job)[source]

Mark job as failed in proposer history.

Parameters

job (Job) – Failed job

get_param(**kwargs)[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

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