From 573dedcf6692724c58a16cd35ef045b8261868ed Mon Sep 17 00:00:00 2001 From: "panxuchen.pxc" Date: Thu, 1 Feb 2024 17:42:29 +0800 Subject: [PATCH] opt distributed example --- .pre-commit-config.yaml | 1 + examples/distributed/distributed_debate.py | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index dea4142eb..35f778a37 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -88,6 +88,7 @@ repos: --disable=W1113, --disable=W0221, --disable=R0401, + --disable=W0632, ] - repo: https://github.com/regebro/pyroma rev: "4.0" diff --git a/examples/distributed/distributed_debate.py b/examples/distributed/distributed_debate.py index 7144e1ad6..669b05304 100644 --- a/examples/distributed/distributed_debate.py +++ b/examples/distributed/distributed_debate.py @@ -85,13 +85,10 @@ def setup_server(parsed_args: argparse.Namespace) -> None: def run_main_process(parsed_args: argparse.Namespace) -> None: """Setup the main debate competition process""" - agents = agentscope.init( + pro_agent, con_agent, judge_agent = agentscope.init( model_configs="configs/model_configs.json", agent_configs="configs/debate_agent_configs.json", ) - pro_agent = agents[0] - con_agent = agents[1] - judge_agent = agents[2] pro_agent = pro_agent.to_dist( host=parsed_args.pro_host, port=parsed_args.pro_port,