fix(factor): output_dir建目录兜底——VPS(Windows)首跑/tmp/factor不存在tears静默失败 [vps]
API路径output_dir硬编码/tmp/factor是容器/NAS约定;Windows解析为当前盘根 \tmp\factor,首跑不存在且tears/心跳open直写不建目录→FileNotFoundError →tears标注json_error静默降级+心跳全丢。os.makedirs exist_ok幂等修复, 赶上统一推vps班车。factor全套测绿
This commit is contained in:
@@ -152,6 +152,11 @@ def run_factor_analysis(
|
||||
report_paths={}
|
||||
)
|
||||
|
||||
# 输出目录兜底建目录:API 路径 output_dir="/tmp/factor" 是容器/NAS 约定,
|
||||
# VPS(Windows)首跑时该路径不存在 → tears JSON/心跳文件 open 直写会
|
||||
# FileNotFoundError → tears 静默失败。exist_ok 幂等,已存在零成本。
|
||||
os.makedirs(output_dir, exist_ok=True)
|
||||
|
||||
# Create AlphaLab session and load symbols
|
||||
session = AlphaLabSession(lab_path=output_dir)
|
||||
# 逐只加载 + 心跳(分钟级任务的可观测性:行情加载 i/N)
|
||||
|
||||
Reference in New Issue
Block a user