sinergym.utils.common.parse_observation_action_space
- sinergym.utils.common.parse_observation_action_space(space_file: str) Dict[str, Any]
Parse observation space definition to gym env.
- Parameters
space_file (str) – Observation space definition file path.
- Raises
RuntimeError – If root XML tag is not ‘space’.
- Returns
‘observation’, ‘discrete_action’ and ‘continuous_action’ keys. tuple for gym.spaces.Box() arguments, dictionary action mapping for gym.spaces.Discrete() and tuple for gym.spaces.Box()
- Return type
Dict[str, Any]