flambe.experiment.options

Module Contents

flambe.experiment.options.Number[source]
class flambe.experiment.options.Options[source]

Bases: flambe.compile.Registrable, abc.ABC

classmethod from_sequence(cls, options: Sequence[Any])[source]

Construct an options class from a sequence of values

Parameters:options (Sequence[Any]) – Discrete sequence that defines what values to search over
Returns:Returns a subclass of DiscreteOptions
Return type:T
convert(self)[source]

Convert the options to Ray Tune representation.

Returns:The Ray Tune conversion
Return type:Dict
classmethod to_yaml(cls, representer: Any, node: Any, tag: str)[source]
classmethod from_yaml(cls, constructor: Any, node: Any, factory_name: str)[source]
class flambe.experiment.options.GridSearchOptions(elements: Sequence[Any])[source]

Bases: Sequence[Any], flambe.experiment.options.Options

Discrete set of values used for grid search

Defines a finite, discrete set of values to be substituted at the location where the set currently resides in the config

classmethod from_sequence(cls, options: Sequence[Any])[source]
convert(self)[source]
__getitem__(self, key: Any)[source]
__len__(self)[source]
__repr__(self)[source]
class flambe.experiment.options.SampledUniformSearchOptions(low: Number, high: Number, k: int, decimals: int = 10)[source]

Bases: Sequence[Number], flambe.experiment.options.Options

Yields k values from the range (low, high)

Randomly yields k values from the range (low, high) to be substituted at the location where the class currently resides in the config

classmethod from_sequence(cls, options: Sequence[Any])[source]
convert(self)[source]
__getitem__(self, key: Any)[source]
__len__(self)[source]
__repr__(self)[source]
classmethod to_yaml(cls, representer: Any, node: Any, tag: str)[source]
class flambe.experiment.options.ClusterResource(location: str)[source]

Bases: flambe.compile.Registrable

classmethod to_yaml(cls, representer: Any, node: Any, tag: str)[source]
classmethod from_yaml(cls, constructor: Any, node: Any, factory_name: str)[source]