agent_studio.agent.human_agent#

Module Contents#

Classes#

HumanAgent

Human agents for Human-recorder

Attributes#

config

logger

agent_studio.agent.human_agent.config[source]#
agent_studio.agent.human_agent.logger[source]#
class agent_studio.agent.human_agent.HumanAgent[source]#

Bases: agent_studio.agent.base_agent.BaseAgent

Human agents for Human-recorder

name = 'human'[source]#
reset(instruction: str) None[source]#
step_action(confirmed: bool, **kwargs) tuple[dict, bool][source]#

Executes the code and record the result.

Parameters:
  • confirmed (bool) – Whether the action is confirmed by the human.

  • obs (np.ndarray | None) – The observation of the environment. For example, the screenshot.

  • code (str) – The code to execute.

  • annotation (dict) – The annotation of the action. For bounding box, etc.

Returns:

The result of the execution and whether the task is done.

Return type:

tuple[dict, bool]

abstract generate_action(obs: numpy.ndarray | None) tuple[str, str][source]#

This function shouldn’t be called by human agents.

abstract trajectory2intermediate_msg() list[dict[str, Any]][source]#

This function shouldn’t be called by human agents.

abstract eval(final_obs: numpy.ndarray | None = None) dict[str, Any][source]#

This function shouldn’t be called by human agents.