phase 7-8 完成 + warmup 修复 + 产物结构化重组
主要内容: - Phase 8 PROMOTE: finalist #1 (trial #324) registry 条目,自动生成 - Optuna objective warmup bug 修复 (shared/optimizer/objective.py) - studies/ 目录按用途重组为 optuna/ + finalists/ + features/ 三层 - reports/ 加入 Optuna 中文 dashboard (5 主图 + 18 slice + 15 contour) - 新增 PROJECT_GUIDE.md 项目说明文档 - 新增 build_registry_entry.py / build_optuna_dashboard.py / build_feature_datasets.py - .gitignore: 允许提交 studies/*.db (Optuna DB) 和 reports/*.html (MT5 + dashboard)
This commit is contained in:
@@ -17,6 +17,9 @@ from pathlib import Path
|
||||
from typing import Any, Mapping
|
||||
|
||||
SET_FILE_ENCODING = "utf-16-le"
|
||||
# MT5's Strategy Tester silently ignores .set files without a UTF-16-LE BOM.
|
||||
# Python's "utf-16-le" codec does NOT emit a BOM, so prepend one explicitly.
|
||||
UTF16_LE_BOM = b"\xff\xfe"
|
||||
|
||||
|
||||
@dataclass
|
||||
@@ -68,4 +71,4 @@ def write_set_file(
|
||||
if extra_lines:
|
||||
lines.extend(extra_lines)
|
||||
text = "\n".join(lines) + "\n"
|
||||
out.write_bytes(text.encode(SET_FILE_ENCODING))
|
||||
out.write_bytes(UTF16_LE_BOM + text.encode(SET_FILE_ENCODING))
|
||||
|
||||
Reference in New Issue
Block a user