SpacesConfig

class maze.perception.models.space_config.SpacesConfig(action_spaces_dict: Dict[Union[str, int], gym.spaces.Dict], observation_spaces_dict: Dict[Union[str, int], gym.spaces.Dict], agent_counts_dict: Dict[Union[str, int], int])

Represents configuration of environment spaces (action & observation) used for model config.

Spaces config are needed (together with model config and dumped state dict) when loading a trained policy for rollout.

classmethod load(in_file_path: str)maze.perception.models.space_config.SpacesConfig

Load a saved spaces config from a file.

Parameters

in_file_path – Where to load the spaces config from.

Returns

Loaded spaces config object

save(dump_file_path: str)None

Save the spaces config to a file.

Parameters

dump_file_path – Where to save the spaces config.