feat: add daily log rotation, llama health wait, factor auto-fixer, and README updates

- Add rdagent/log/daily_log.py: daily-rotating structured logs per command
  (fin_quant, strategies, evaluate, parallel) with loguru; all.log combined sink
- predix.py: route TeeWriter output to logs/YYYY-MM-DD/ instead of root dir;
  wrap quant() and evaluate() in daily_log.session() for start/stop/duration tracking
- rdagent/app/cli.py: fin_quant_cli waits for llama.cpp /health endpoint before
  starting pipeline (up to 300 s); daily_log integration for fin_quant,
  generate_strategies, eval_all, parallel commands
- scripts/predix_gen_strategies_real_bt.py: daily_log integration with
  per-strategy ACCEPTED/REJECTED entries and summary on completion
- rdagent/components/coder/factor_coder/auto_fixer.py: new module that patches
  common LLM-generated factor issues (min_periods, inf/NaN, groupby.transform,
  MultiIndex corrections)
- rdagent/components/coder/factor_coder/prompts.yaml: add critical rules for
  EURUSD 1-min intraday factors (min_periods, inf handling, groupby, date range)
- README.md: document --reasoning off and --n-gpu-layers 28 for llama-server;
  explain VRAM constraints when Ollama is running alongside llama.cpp
- .bandit.yml: suppress B615 (HuggingFace unsafe download) for RL benchmark files

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
TPTBusiness
2026-04-16 07:20:08 +02:00
parent 005107a461
commit 2cec08bc91
11 changed files with 748 additions and 37 deletions
+8 -2
View File
@@ -147,11 +147,17 @@ QLIB_DATA_DIR=~/.qlib/qlib_data/eurusd_1min_data
```bash
~/llama.cpp/build/bin/llama-server \
--model ~/models/qwen3.5/Qwen3.5-35B-A3B-Q3_K_M.gguf \
--n-gpu-layers 36 \
--n-gpu-layers 28 \
--ctx-size 80000 \
--port 8081
--port 8081 \
--reasoning off
```
> **Important flags:**
> - `--reasoning off` — disables chain-of-thought thinking mode. Without this, Qwen3.5 spends 1522 s per request on internal reasoning, which causes rdagent to time out after 10 retries. With it off, responses take ~0.6 s.
> - `--n-gpu-layers 28` — use 28 instead of 36 if another GPU process (e.g. Ollama) is already running. 36 layers will exceed VRAM on a 16 GB card when Ollama occupies ~668 MB. Reduce layers further if you hit `cudaMalloc failed: out of memory`.
> - `--ctx-size 80000` — 80 k context is required for long factor-generation prompts.
---
## Quick Start