mirror of
https://github.com/TauricResearch/TradingAgents.git
synced 2026-09-20 11:45:29 +03:00
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:
@@ -105,7 +105,6 @@ DEFAULT_CONFIG = _apply_env_overrides({
|
||||
"max_debate_rounds": 1,
|
||||
"max_risk_discuss_rounds": 1,
|
||||
"max_recur_limit": 100,
|
||||
"analyst_concurrency_limit": 1,
|
||||
# News / data fetching parameters
|
||||
# Increase for longer lookback strategies or to broaden macro coverage;
|
||||
# decrease to reduce token usage in agent prompts.
|
||||
|
||||
@@ -15,7 +15,6 @@ class AnalystNodeSpec:
|
||||
@dataclass(frozen=True)
|
||||
class AnalystExecutionPlan:
|
||||
specs: list[AnalystNodeSpec]
|
||||
concurrency_limit: int
|
||||
|
||||
|
||||
ANALYST_NODE_SPECS: dict[str, AnalystNodeSpec] = {
|
||||
@@ -56,11 +55,7 @@ ANALYST_NODE_SPECS: dict[str, AnalystNodeSpec] = {
|
||||
|
||||
def build_analyst_execution_plan(
|
||||
selected_analysts: Iterable[str],
|
||||
concurrency_limit: int = 1,
|
||||
) -> AnalystExecutionPlan:
|
||||
if concurrency_limit < 1:
|
||||
raise ValueError("analyst concurrency limit must be >= 1")
|
||||
|
||||
specs: list[AnalystNodeSpec] = []
|
||||
for analyst_key in selected_analysts:
|
||||
spec = ANALYST_NODE_SPECS.get(analyst_key)
|
||||
@@ -71,7 +66,7 @@ def build_analyst_execution_plan(
|
||||
if not specs:
|
||||
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:
|
||||
|
||||
@@ -35,14 +35,12 @@ class GraphSetup:
|
||||
deep_thinking_llm: Any,
|
||||
tool_nodes: dict[str, ToolNode],
|
||||
conditional_logic: ConditionalLogic,
|
||||
analyst_concurrency_limit: int = 1,
|
||||
):
|
||||
"""Initialize with required components."""
|
||||
self.quick_thinking_llm = quick_thinking_llm
|
||||
self.deep_thinking_llm = deep_thinking_llm
|
||||
self.tool_nodes = tool_nodes
|
||||
self.conditional_logic = conditional_logic
|
||||
self.analyst_concurrency_limit = analyst_concurrency_limit
|
||||
|
||||
def setup_graph(
|
||||
self, selected_analysts=("market", "social", "news", "fundamentals")
|
||||
@@ -56,10 +54,7 @@ class GraphSetup:
|
||||
- "news": News analyst
|
||||
- "fundamentals": Fundamentals analyst
|
||||
"""
|
||||
plan = build_analyst_execution_plan(
|
||||
selected_analysts,
|
||||
concurrency_limit=self.analyst_concurrency_limit,
|
||||
)
|
||||
plan = build_analyst_execution_plan(selected_analysts)
|
||||
|
||||
analyst_factories = {
|
||||
"market": lambda: create_market_analyst(self.quick_thinking_llm),
|
||||
|
||||
@@ -110,7 +110,6 @@ class TradingAgentsGraph:
|
||||
self.deep_thinking_llm,
|
||||
self.tool_nodes,
|
||||
self.conditional_logic,
|
||||
analyst_concurrency_limit=self.config.get("analyst_concurrency_limit", 1),
|
||||
)
|
||||
|
||||
self.propagator = Propagator(
|
||||
|
||||
Reference in New Issue
Block a user