spines.parameters.base¶
Base classes for model parameters.
-
class
spines.parameters.base.HyperParameter(*value_type, default=None, desc: str = None)[source]¶ Bases:
spines.parameters.base.ParameterHyper-parameter
-
exception
spines.parameters.base.InvalidParameterException[source]¶ Bases:
spines.parameters.base.ParameterExceptionThrown when an invalid parameter is given.
-
exception
spines.parameters.base.MissingParameterException[source]¶ Bases:
spines.parameters.base.ParameterExceptionThrown when a required parameter is missing.
-
class
spines.parameters.base.Parameter(*value_type, default=None, desc: str = None)[source]¶ Bases:
objectParameter class
- Parameters
value_type (
typeorIterableoftype) – The type(s) of values allowed for this parameter.default (object, optional) – Default value for this parameter, if any.
desc (str, optional) – Description for this parameter, if any.
-
check(value) → bool[source]¶ Checks the given value for validity
- Parameters
value – Parameter value to check validity of.
- Returns
Whether or not the value is valid for the parameter.
- Return type
bool
-
default¶ Default value to use for this parameter.
- Type
object
-
desc¶ Description of this parameter.
- Type
str
-
name¶ Name of this parameter.
- Type
str
-
required¶ Whether or not this parameter is required to be set.
- Type
bool
-
value_type¶ The types of values allowed for this option.
- Type
tuple