Align branding, prompts, and deployment tooling
This commit is contained in:
@@ -18,7 +18,6 @@ from agentscope.message import Msg
|
||||
from agentscope.pipeline import MsgHub
|
||||
|
||||
from backend.utils.settlement import SettlementCoordinator
|
||||
from backend.utils.terminal_dashboard import get_dashboard
|
||||
from backend.core.state_sync import StateSync
|
||||
from backend.utils.trade_executor import PortfolioTradeExecutor
|
||||
from backend.runtime.manager import TradingRuntimeManager
|
||||
@@ -48,13 +47,9 @@ except ImportError:
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def _log(msg: str):
|
||||
"""Log to dashboard if available, otherwise to logger"""
|
||||
dashboard = get_dashboard()
|
||||
if dashboard.live:
|
||||
dashboard.log(msg)
|
||||
else:
|
||||
logger.info(msg)
|
||||
def _log(msg: str) -> None:
|
||||
"""Helper function for pipeline logging."""
|
||||
logger.info(msg)
|
||||
|
||||
|
||||
class TradingPipeline:
|
||||
@@ -71,7 +66,7 @@ class TradingPipeline:
|
||||
|
||||
Real-time updates via StateSync after each agent completes.
|
||||
|
||||
Supports both legacy agent lists and new workspace-based agent loading.
|
||||
Supports both legacy agent lists and run-scoped agent loading.
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
@@ -1625,14 +1620,13 @@ class TradingPipeline:
|
||||
project_root = Path(__file__).resolve().parents[2]
|
||||
personas = get_prompt_loader().load_yaml_config("analyst", "personas")
|
||||
persona = personas.get(analyst_type, {})
|
||||
WorkspaceManager(project_root=project_root).ensure_agent_assets(
|
||||
workspace_manager = WorkspaceManager(project_root=project_root)
|
||||
workspace_manager.ensure_agent_assets(
|
||||
config_name=config_name,
|
||||
agent_id=agent_id,
|
||||
role_seed=persona.get("description", "").strip(),
|
||||
style_seed="\n".join(f"- {item}" for item in persona.get("focus", [])),
|
||||
policy_seed=(
|
||||
"State a clear signal, confidence, and the conditions "
|
||||
"that would invalidate the thesis."
|
||||
file_contents=workspace_manager.build_default_agent_files(
|
||||
agent_id=agent_id,
|
||||
persona=persona,
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
@@ -232,7 +232,7 @@ async def run_pipeline(
|
||||
|
||||
try:
|
||||
# Extract config values
|
||||
tickers = bootstrap.get("tickers", ["AAPL", "MSFT"])
|
||||
tickers = bootstrap.get("tickers", ["AAPL", "MSFT", "GOOGL", "AMZN", "NVDA", "META", "TSLA", "AMD", "NFLX", "AVGO", "PLTR", "COIN"])
|
||||
initial_cash = float(bootstrap.get("initial_cash", 100000.0))
|
||||
margin_requirement = float(bootstrap.get("margin_requirement", 0.0))
|
||||
max_comm_cycles = int(bootstrap.get("max_comm_cycles", 2))
|
||||
|
||||
Reference in New Issue
Block a user