feat(polish): 因子报告 IC 提取 + periods 提参 + 缓存上限 + 代码整洁

- analyzer.py: 提取 IC 值到 ic_summary (mean/std/icir/t_stat),periods 提参 (默认 1,5,10)
- alpha_lab.py: _loaded_bars 缓存 LRU 上限 (_MAX_CACHED_SYMBOLS=50)
- runner.py: 统一阶段文案 (参数优化中/因子分析中),worker 类型标注,_wait_future 文档
- pool.py: submit_work 添加 task_id debug 日志

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-07-06 21:32:27 +08:00
parent b2c2a1305b
commit fa7237b996
6 changed files with 307 additions and 17 deletions
+4
View File
@@ -2,10 +2,13 @@
Task pool for managing multiple tasks in memory
Provides task storage and status tracking (not actual multiprocessing)
"""
import logging
from concurrent.futures import ProcessPoolExecutor, Future
from multiprocessing import get_context
from .task import Task, TaskState
logger = logging.getLogger(__name__)
class TaskPool:
"""Manages task storage and status tracking"""
@@ -26,6 +29,7 @@ class TaskPool:
def submit_work(self, task_id: str, func, *args) -> Future:
"""Submit work to the process pool executor"""
logger.debug("submit_work task_id=%s", task_id)
return self.executor.submit(func, *args)
def update_stage(self, task_id: str, stage: str):