tune.space
is_constant
def is_constant(space: Union[Dict, List]) -> bool
Whether the search space is all constant.
Returns:
A bool of whether the search space is all constant.
define_by_run_func
def define_by_run_func(trial, space: Dict, path: str = "") -> Optional[Dict[str, Any]]
Define-by-run function to create the search space.
Returns:
A dict with constant values.
unflatten_hierarchical
def unflatten_hierarchical(config: Dict, space: Dict) -> Tuple[Dict, Dict]
Unflatten hierarchical config.
add_cost_to_space
def add_cost_to_space(space: Dict, low_cost_point: Dict, choice_cost: Dict)
Update the space in place by adding low_cost_point and choice_cost.
Returns:
A dict with constant values.
normalize
def normalize(config: Dict, space: Dict, reference_config: Dict, normalized_reference_config: Dict, recursive: bool = False)
Normalize config in space according to reference_config.
Normalize each dimension in config to [0,1].
indexof
def indexof(domain: Dict, config: Dict) -> int
Find the index of config in domain.categories.
complete_config
def complete_config(partial_config: Dict, space: Dict, flow2, disturb: bool = False, lower: Optional[Dict] = None, upper: Optional[Dict] = None) -> Tuple[Dict, Dict]
Complete partial config in space.
Returns:
config, space.