syne_tune.optimizer.schedulers.searchers.gp_searcher_utils module

class syne_tune.optimizer.schedulers.searchers.gp_searcher_utils.MapReward(forward, reverse)[source]

Bases: object

forward: Callable[[float], float]
reverse: Callable[[float], float]
syne_tune.optimizer.schedulers.searchers.gp_searcher_utils.map_reward_const_minus_x(const=1.0)[source]

Factory for map_reward argument in GPMultiFidelitySearcher.

Return type:

MapReward

syne_tune.optimizer.schedulers.searchers.gp_searcher_utils.encode_state(state)[source]
Return type:

Dict[str, Any]

syne_tune.optimizer.schedulers.searchers.gp_searcher_utils.decode_state(enc_state, hp_ranges)[source]
Return type:

TuningJobState

syne_tune.optimizer.schedulers.searchers.gp_searcher_utils.decode_state_from_old_encoding(enc_state, hp_ranges)[source]

Decodes TuningJobState from encoding done for the old definition of TuningJobState. Code maintained for backwards compatibility.

Note: Since the old TuningJobState did not contain trial_id, we need to make them up here. We assign these IDs in the order candidate_evaluations, failed_candidates, pending_candidates, matching for duplicates.

Parameters:
Return type:

TuningJobState

Returns:

class syne_tune.optimizer.schedulers.searchers.gp_searcher_utils.ResourceForAcquisitionMap[source]

Bases: object

In order to use a standard acquisition function (like expected improvement) for multi-fidelity HPO, we need to decide at which r_acq we would like to evaluate the AF, w.r.t. the posterior distribution over f(x, r=r_acq). This decision can depend on the current state.

class syne_tune.optimizer.schedulers.searchers.gp_searcher_utils.ResourceForAcquisitionBOHB(threshold, active_metric='target')[source]

Bases: ResourceForAcquisitionMap

Implements a heuristic proposed in the BOHB paper: r_acq is the largest r such that we have at least threshold observations at r. If there are less than threshold observations at all levels, the smallest level is returned.

class syne_tune.optimizer.schedulers.searchers.gp_searcher_utils.ResourceForAcquisitionFirstMilestone[source]

Bases: ResourceForAcquisitionMap

Here, r_acq is the smallest rung level to be attained by a config started from scratch.

class syne_tune.optimizer.schedulers.searchers.gp_searcher_utils.ResourceForAcquisitionFinal(r_max)[source]

Bases: ResourceForAcquisitionMap

Here, r_acq = r_max is the largest resource level.

syne_tune.optimizer.schedulers.searchers.gp_searcher_utils.resource_for_acquisition_factory(kwargs, hp_ranges)[source]
Return type:

ResourceForAcquisitionMap