releso.observation.ObservationDefinitionMulti
- class releso.observation.ObservationDefinitionMulti(*, save_location: Path, logger_name: str | None = None, name: str, value_min: float, value_max: float, observation_shape: List[int], value_type: Literal['float', 'CNN'])
Bases:
ObservationDefinitionDefine a multidimensional Observations space.
Definition of a single Observations by providing the name of the value and the range in which the value is limited to.
The range is necessary due to normalization of the input of the agent networks.
- __init__(**data: Any) None
Constructor for the ReLeSO basemodel object.
Methods
convert_to_pathlib_add_datetime(v)Add timestamp to save_location, of applicable.
Provide default observations.
get_logger()Gets the currently defined environment logger.
Provide definition of the defined observations space.
set_logger_name_recursively(logger_name)Set the logger_name variable for all child elements.
Attributes
Shape of the Observation space.
Type of the Observation space.
nameName of the observation
value_minminimum of the range in which the observation is bound
value_maxmaximum of the range in which the observation is bound
save_locationDefinition of the save location of the logs and validation results.
logger_namename of the logger.
- get_default_observation() ndarray
Provide default observations.
Gives a default observations of the correct shape, purpose is when the observation fails that the observation can still be generated so that the training does not error out.
- Returns:
An array filled with ones in the correct shape and size of the observation.
- Return type:
np.ndarray
- get_observation_definition() Tuple[str, gymnasium.spaces.Space]
Provide definition of the defined observations space.
Returns a tuple of name and observation definition defined via the gymnasium.observation interface
- Returns:
- Tuple of the name of the observation
and a gymnasium.Box definition
- Return type:
Tuple[str, Space]
- observation_shape: List[int]
Shape of the Observation space. List of number of elements per dimension
- value_type: Literal['float', 'CNN']
Type of the Observation space. If float uses the value_min etc definition for the limits of the space. If CNN uses [0, 255] limits.