class_docstr: Partial map of two countable action spaces. For example, consider an environment
  with a MultiSelect action space (select multiple actions at the same time, such as jump and go right), with 8 actual
  MultiSelect actions. If we want the agent to be able to select only 5 of those actions by their index (0-4), we can
  map a discrete action space with 5 actions into the 5 selected MultiSelect actions. This will both allow the agent to
  use regular discrete actions, and mask 3 of the actions from the agent.
class_docstr_tok: ["Partial","map","of","two","countable","action","spaces",".","For","example",",","consider","an","environment","with","a","MultiSelect","action","space","(","select","multiple","actions","at","the","same","time",",","such","as","jump","and","go","right",")",",","with","8","actual","MultiSelect","actions",".","If","we","want","the","agent","to","be","able","to","select","only","5","of","those","actions","by","their","index","(","0-4",")",",","we","can","map","a","discrete","action","space","with","5","actions","into","the","5","selected","MultiSelect","actions",".","This","will","both","allow","the","agent","to","use","regular","discrete","actions",",","and","mask","3","of","the","actions","from","the","agent","."]
code: def validate_output_action_space(
      self, output_action_space: ActionSpace
  ):
      if not self.target_actions:
          raise ValueError("The target actions were not set")
      for v in self.target_actions:
          if not output_action_space.contains(v):
              raise ValueError(
                  "The values in the output actions ({}) do not match the output action "
                  "space definition ({})".format(v, output_action_space)
              )
  
file_path: coach/rl_coach/filters/action/partial_discrete_action_space_map.py
imports: from typing import List
  from rl_coach.core_types import ActionType
  from rl_coach.filters.action.action_filter import ActionFilter
  from rl_coach.spaces import DiscreteActionSpace, ActionSpace
label_desc: Use image node_id 2 for calling the PartialDiscreteActionSpaceMap obj's underlying member method code with example usage: obj.validate_output_action_space(output_action_space) without return types