in project/paperbench/paperbench/agents/run.py [0:0]
def build_agent_command(agent: Agent, agent_dir: str) -> str:
"""Builds the command to run the agent."""
cmd = ["bash", f"{agent_dir}/start.sh"]
if agent.kwargs_type == "argparse":
for key, value in agent.kwargs.items():
cmd += [f"--{key}", str(value)]
if agent.kwargs_type == "omegaconf":
cmd += [f"{key}={value}" for key, value in agent.kwargs.items()]
return " ".join(cmd)