chore(config): remove the no-op analyst_concurrency_limit knob

The knob was accepted but inert — analysts run strictly sequentially and the
value was never used. Remove it rather than ship a misleading config key.
Parallel analyst execution is tracked for v0.3 (#634/#671/#487).
This commit is contained in:
Yijia-Xiao
2026-06-21 22:31:35 +00:00
parent 0405168f20
commit ec3974b84e
6 changed files with 4 additions and 24 deletions

View File

@@ -1084,10 +1084,7 @@ def run_analysis(checkpoint: bool | None = None):
# Normalize analyst selection to predefined order (selection is a 'set', order is fixed) # Normalize analyst selection to predefined order (selection is a 'set', order is fixed)
selected_set = {analyst.value for analyst in selections["analysts"]} selected_set = {analyst.value for analyst in selections["analysts"]}
selected_analyst_keys = [a for a in ANALYST_ORDER if a in selected_set] selected_analyst_keys = [a for a in ANALYST_ORDER if a in selected_set]
analyst_execution_plan = build_analyst_execution_plan( analyst_execution_plan = build_analyst_execution_plan(selected_analyst_keys)
selected_analyst_keys,
concurrency_limit=config["analyst_concurrency_limit"],
)
analyst_wall_time_tracker = AnalystWallTimeTracker(analyst_execution_plan) analyst_wall_time_tracker = AnalystWallTimeTracker(analyst_execution_plan)
# Initialize the graph with callbacks bound to LLMs # Initialize the graph with callbacks bound to LLMs

View File

@@ -10,10 +10,9 @@ from tradingagents.graph.analyst_execution import (
class AnalystExecutionPlanTests(unittest.TestCase): class AnalystExecutionPlanTests(unittest.TestCase):
def test_build_plan_preserves_selected_order(self): def test_build_plan_preserves_selected_order(self):
plan = build_analyst_execution_plan(["news", "market"], concurrency_limit=2) plan = build_analyst_execution_plan(["news", "market"])
self.assertEqual([spec.key for spec in plan.specs], ["news", "market"]) self.assertEqual([spec.key for spec in plan.specs], ["news", "market"])
self.assertEqual(plan.concurrency_limit, 2)
self.assertEqual(plan.specs[0].agent_node, "News Analyst") self.assertEqual(plan.specs[0].agent_node, "News Analyst")
self.assertEqual(plan.specs[0].tool_node, "tools_news") self.assertEqual(plan.specs[0].tool_node, "tools_news")
self.assertEqual(plan.specs[0].clear_node, "Msg Clear News") self.assertEqual(plan.specs[0].clear_node, "Msg Clear News")
@@ -22,10 +21,6 @@ class AnalystExecutionPlanTests(unittest.TestCase):
with self.assertRaises(ValueError): with self.assertRaises(ValueError):
build_analyst_execution_plan(["market", "macro"]) build_analyst_execution_plan(["market", "macro"])
def test_requires_positive_concurrency_limit(self):
with self.assertRaises(ValueError):
build_analyst_execution_plan(["market"], concurrency_limit=0)
def test_get_initial_analyst_node_uses_plan_metadata(self): def test_get_initial_analyst_node_uses_plan_metadata(self):
plan = build_analyst_execution_plan(["fundamentals", "news"]) plan = build_analyst_execution_plan(["fundamentals", "news"])

View File

@@ -105,7 +105,6 @@ DEFAULT_CONFIG = _apply_env_overrides({
"max_debate_rounds": 1, "max_debate_rounds": 1,
"max_risk_discuss_rounds": 1, "max_risk_discuss_rounds": 1,
"max_recur_limit": 100, "max_recur_limit": 100,
"analyst_concurrency_limit": 1,
# News / data fetching parameters # News / data fetching parameters
# Increase for longer lookback strategies or to broaden macro coverage; # Increase for longer lookback strategies or to broaden macro coverage;
# decrease to reduce token usage in agent prompts. # decrease to reduce token usage in agent prompts.

View File

@@ -15,7 +15,6 @@ class AnalystNodeSpec:
@dataclass(frozen=True) @dataclass(frozen=True)
class AnalystExecutionPlan: class AnalystExecutionPlan:
specs: list[AnalystNodeSpec] specs: list[AnalystNodeSpec]
concurrency_limit: int
ANALYST_NODE_SPECS: dict[str, AnalystNodeSpec] = { ANALYST_NODE_SPECS: dict[str, AnalystNodeSpec] = {
@@ -56,11 +55,7 @@ ANALYST_NODE_SPECS: dict[str, AnalystNodeSpec] = {
def build_analyst_execution_plan( def build_analyst_execution_plan(
selected_analysts: Iterable[str], selected_analysts: Iterable[str],
concurrency_limit: int = 1,
) -> AnalystExecutionPlan: ) -> AnalystExecutionPlan:
if concurrency_limit < 1:
raise ValueError("analyst concurrency limit must be >= 1")
specs: list[AnalystNodeSpec] = [] specs: list[AnalystNodeSpec] = []
for analyst_key in selected_analysts: for analyst_key in selected_analysts:
spec = ANALYST_NODE_SPECS.get(analyst_key) spec = ANALYST_NODE_SPECS.get(analyst_key)
@@ -71,7 +66,7 @@ def build_analyst_execution_plan(
if not specs: if not specs:
raise ValueError("at least one analyst must be selected") raise ValueError("at least one analyst must be selected")
return AnalystExecutionPlan(specs=specs, concurrency_limit=concurrency_limit) return AnalystExecutionPlan(specs=specs)
def get_initial_analyst_node(plan: AnalystExecutionPlan) -> str: def get_initial_analyst_node(plan: AnalystExecutionPlan) -> str:

View File

@@ -35,14 +35,12 @@ class GraphSetup:
deep_thinking_llm: Any, deep_thinking_llm: Any,
tool_nodes: dict[str, ToolNode], tool_nodes: dict[str, ToolNode],
conditional_logic: ConditionalLogic, conditional_logic: ConditionalLogic,
analyst_concurrency_limit: int = 1,
): ):
"""Initialize with required components.""" """Initialize with required components."""
self.quick_thinking_llm = quick_thinking_llm self.quick_thinking_llm = quick_thinking_llm
self.deep_thinking_llm = deep_thinking_llm self.deep_thinking_llm = deep_thinking_llm
self.tool_nodes = tool_nodes self.tool_nodes = tool_nodes
self.conditional_logic = conditional_logic self.conditional_logic = conditional_logic
self.analyst_concurrency_limit = analyst_concurrency_limit
def setup_graph( def setup_graph(
self, selected_analysts=("market", "social", "news", "fundamentals") self, selected_analysts=("market", "social", "news", "fundamentals")
@@ -56,10 +54,7 @@ class GraphSetup:
- "news": News analyst - "news": News analyst
- "fundamentals": Fundamentals analyst - "fundamentals": Fundamentals analyst
""" """
plan = build_analyst_execution_plan( plan = build_analyst_execution_plan(selected_analysts)
selected_analysts,
concurrency_limit=self.analyst_concurrency_limit,
)
analyst_factories = { analyst_factories = {
"market": lambda: create_market_analyst(self.quick_thinking_llm), "market": lambda: create_market_analyst(self.quick_thinking_llm),

View File

@@ -110,7 +110,6 @@ class TradingAgentsGraph:
self.deep_thinking_llm, self.deep_thinking_llm,
self.tool_nodes, self.tool_nodes,
self.conditional_logic, self.conditional_logic,
analyst_concurrency_limit=self.config.get("analyst_concurrency_limit", 1),
) )
self.propagator = Propagator( self.propagator = Propagator(