Registries

class orion.algo.registry.Registry[source]

In-memory container for the trials that the algorithm suggests/observes/etc.

Attributes
state_dict

Get the state of the registry as a dictionary.

Methods

get_existing(trial)

Get the equivalent trial from the registry.

has_observed(trial)

Check if the trial has been observed.

has_suggested(trial)

Check if the trial has been suggested.

register(trial)

Register the given trial in the registry.

set_state(statedict)

Set the state of the registry from the given dictionary.

get_existing(trial: Trial) Trial[source]

Get the equivalent trial from the registry.

If trial isn’t in the registry, raises a RuntimeError.

has_observed(trial: Trial) bool[source]

Check if the trial has been observed.

has_suggested(trial: Trial) bool[source]

Check if the trial has been suggested.

register(trial: Trial) str[source]

Register the given trial in the registry.

set_state(statedict: dict) None[source]

Set the state of the registry from the given dictionary.

property state_dict: dict

Get the state of the registry as a dictionary.

class orion.algo.registry.RegistryMapping(original_registry: Registry, transformed_registry: Registry)[source]

A map between the original and transformed registries.

This object is used in the SpaceTransformAlgoWrapper to check if a trial in the original space has equivalent trials in the transformed space.

The goal is to make it so the algorithms don’t have to care about the transforms/etc.

Attributes
state_dict

Get the state of the registry mapping as a dictionary.

Methods

get_trials(original_trial)

Return the registered transformed trials that map to the given trial in the original space.

register(original_trial, transformed_trial)

Register an equivalence between the given original trial and the transformed trial.

set_state(statedict)

Set the state of the registry mapping from the given dictionary.

get_trials(original_trial: Trial) list[Trial][source]

Return the registered transformed trials that map to the given trial in the original space.

register(original_trial: Trial, transformed_trial: Trial) str[source]

Register an equivalence between the given original trial and the transformed trial.

set_state(statedict: dict)[source]

Set the state of the registry mapping from the given dictionary.

NOTE: This does NOT set the state of the individual registries.

property state_dict: dict

Get the state of the registry mapping as a dictionary.

NOTE: This does NOT include the state of the individual registries.