Parameters

Warning

This module is not mature

class byotrack.api.parameters.ParameterRange

Bases: ABC

Define a range of validity for parameters.

abstractmethod is_valid(parameter: object) bool

Check that the parameter’s value is in the validity range.

abstractmethod to_str() str

Returns a string describing the valid range.

class byotrack.api.parameters.ParameterBound(low: float, high: float)

Bases: ParameterRange

Bounded parameters between low and high values.

is_valid(parameter: object) bool

Check that the parameter’s value is in the validity range.

to_str() str

Returns a string describing the valid range.

class byotrack.api.parameters.ParameterEnum(values: set)

Bases: ParameterRange

Parameters that can have only a set of predefined value.

is_valid(parameter: object) bool

Check that the parameter’s value is in the validity range.

to_str() str

Returns a string describing the valid range.

class byotrack.api.parameters.ParametrizedObjectMixin

Bases: object

Objects with hyper parameters [Deprecated].

The child classes have to define the parameters dict that describes all their parameters with a ParameterRange. When the instance tries to set a parameter value, this range is used to validate the value.

parametrized

Registered child ParametrizedObjectMixin ParametrizedObjectMixin attributes are automatically registered.

Type:

dict[str, ParametrizedObjectMixin]

parameters

Defined range for parameters

Type:

dict[str, ParameterRange]