ray.rllib.core.models.catalog.Catalog._get_dist_cls_from_action_space#
- classmethod Catalog._get_dist_cls_from_action_space(action_space: gymnasium.Space, *, framework: str | None = None) Distribution [source]#
Returns a distribution class for the given action space.
You can get the required input dimension for the distribution by calling
action_dict_cls.required_input_dim(action_space)
on the retrieved class. This is useful, because the Catalog needs to find out about the required input dimension for the distribution before the model that outputs these inputs is configured.- Parameters:
action_space – Action space of the target gym env.
framework – The framework to use.
- Returns:
The distribution class for the given action space.