set_action_for_agent(behavior_name,agent_id,action) seems working differently from the docs?

Hi I’m using mlagent-envs(0.22.0) for python control of 20 agents in a custom unity scene. What i want is to set actions of agent one by one according to its own observations every time decisions are requested. (The 20 agent have the same behavior and the action(float) size is 2. ) So I checked the docs and thought set_action_for_agent(,) fits well.

Here is my python code of one decison step:
‘’'py
agent_id = decision_steps.agent_id
action = np.ones(2)
env.set_action_for_agent(behavior_name, agent_id, action)
env.step()
‘’’
But errors occurs:
‘’’
mlagents_envs.exception.UnityActionException: The behavior FighterBehavior?team=0 needs an input of dimension (20, 2) for (, ) but received input of dimension (2,)
‘’’
I’m confused with the result because it seems defferent from the docs:
"
env.set_action_for_agent(agent_group: str, agent_id: int, action: ActionTuple) Sets the action for a specific Agent in an agent group. agent_group is the name of the group the Agent belongs to and agent_id is the integer identifier of the Agent. action is an ActionTuple as described above.
"
which I understand as the atrribute action shape should be for a single agent, in my case is (2,)

Delete 356 line ‘action = action_spec._validate_action(action, num_agents, behavior_name)’ in environment.py solved the problem: