fix: 15 bug fixes across orchestrator, runner, backtest, and infrastructure

Critical:
- strategy_orchestrator: fix IndentationError that prevented import (line 764)
- factor_runner: fix literal 'sys.executable' string → variable (line 966)

High (path bugs causing wrong directories):
- backtest_engine: fix results_path depth (3→4 .parent hops)
- results_db: fix factors_dir/failed_dir depth (3→4 .parent hops)
- factor_runner: eliminate run_id variable shadowing (parallel_run_id/db_run_id)
- model_runner: fix DB connection leak on add_backtest exception
- optuna_optimizer: fix imported logger shadowed by module-level reassignment

Medium:
- env: handle non-UTF-8 Docker build output with errors='replace'
- env: guard conda env list parsing against empty lines
- factor_runner: add check=False + stderr logging for full-data subprocess
- strategy_orchestrator: log exec() exceptions at ERROR level with traceback
- strategy_orchestrator: warn on unreplaced {{template}} variables in prompts

Low:
- factor_runner: guard IC_max.index access against scalar (AttributeError)
- predix_parallel: close log file handle on Popen failure
- predix_rebacktest_strategies: replace 4 bare except: with except Exception:
This commit is contained in:
TPTBusiness
2026-05-03 09:37:00 +02:00
parent 571c902c2d
commit 5bf84ff835
10 changed files with 348 additions and 38 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ import pandas as pd
from rdagent.log import rdagent_logger as logger
logger = logging.getLogger(__name__)
_optuna_logger = logging.getLogger(__name__)
try:
import optuna