Hyper parameter Optimization

Registered HPO

Module contents

class olympus.hpo.HPOptimizer(name=None, *, hpo=None, **kwargs)[source]

Bases: object

Olympus standardized HPO interface

Examples

def add(a, b):
     return a + b

hpo = HPOptimizer('hyperband', space={
    'a': 'uniform(0, 1)',
    'b': 'uniform(0, 1)'
})

while not hpo.is_done():
    for args in hpo:
        # try a new configuration
        result = add(**args)

        # forward the result to the optimizer
        hpo.observe(args, result)

hpo.result()
(OrderedDict([('a', 0.02021839744032572), ('b', 0.05433798833925363), ('uid', 'b6b3c96296beaad9'), ('epoch', 8)]), 0.07455638577957935
Attributes:
trials

Methods

ctor_call  
info  
insert_manual_sample  
is_done  
load_state_dict  
observe  
remaining  
result  
state_dict  
suggest  
ctor_call()[source]
info()[source]
insert_manual_sample(sample=None, fidelity_override=None, **kwargs)[source]
is_done()[source]
load_state_dict(state)[source]
observe(args, result)[source]
remaining()[source]
result()[source]
state_dict(compressed=True)[source]
suggest(**kwargs)[source]
trials
exception olympus.hpo.RegisteredHPONotFound[source]

Bases: Exception

olympus.hpo.check()[source]
olympus.hpo.known_hpo()[source]
olympus.hpo.register_hpo(name, factory, override=False)[source]