Commit Graph

5 Commits

Author SHA1 Message Date
TPTBusiness 108a63fd79 feat: Strategy Generator working with local LLM (P0-P4)
Integrated strategy generation into fin_quant loop:
- Fixed LLM code extraction from JSON responses
- Fixed factor loading (MultiIndex parquet handling)
- Fixed return calculation (realistic proxy)
- Fixed max drawdown (NaN/inf handling)
- Added llama.cpp --reasoning off support
- Strategy orchestrator with LLM + evaluation
- Optuna optimizer integration

100% acceptance rate on test run (2/2 strategies).
Total changes: +2006 lines, -129 lines across 8 files.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-09 12:55:04 +02:00
TPTBusiness 5ef1fd65db fix: Use num_api_keys instead of len(api_keys) for round-robin
- Fix API key index calculation to respect --api-keys parameter
- Previously always used all available keys regardless of setting
- Now correctly assigns only requested number of API keys

Usage:
  python predix_parallel.py --runs 25 --api-keys 1 -m openrouter
  -> All 25 runs use API Key 1 only
2026-04-04 10:35:10 +02:00
TPTBusiness 56d73d22e9 feat: Support 25+ parallel runs with resource warnings
- Allow up to 50 runs (25 recommended max)
- Add --force flag to bypass warnings
- Show RAM estimate for high run counts
- Update CLI help text with max recommendation

Usage:
  python predix_parallel.py --runs 25 -m openrouter
  python predix_parallel.py --runs 50 --force -m openrouter

Tests: 103 passed
2026-04-04 10:29:50 +02:00
TPTBusiness 9ec6008ad8 fix: Fix parallel runner dashboard rendering error
- Use Rich Group instead of string join for Table + Panel layout
- Fix TypeError: sequence item 0: expected str instance, Table found
- Live dashboard now renders correctly with parallel runs

Tests still passing (103)
2026-04-04 10:04:49 +02:00
TPTBusiness 68ea969c32 feat: Add parallel run system with API key distribution
- Add predix_parallel.py: Run multiple factor experiments concurrently
  * python predix_parallel.py --runs 5 --api-keys 2 -m openrouter
  * Round-robin API key distribution across available keys
  * Rich live dashboard with per-run status, elapsed time, exit codes
  * Graceful shutdown (Ctrl+C kills all children cleanly)

- Add --run-id parameter to predix.py for isolated single runs
  * Separate log files: fin_quant_run{N}.log
  * Separate results: results/runs/run{N}/
  * Separate workspace: RD-Agent_workspace_run{N}/
  * Separate databases per run

- Modify CoSTEER and FactorRunner for PARALLEL_RUN_ID isolation
  * _save_intermediate_results uses run-specific directories
  * _save_result_to_database and _write_run_log isolated per run
  * _ensure_results_dirs creates run-specific paths

- Reduce max_loop from 10 to 3 for faster iterations
- Add docs/parallel_runs.md with full documentation

Tests: 103 passed
2026-04-04 09:39:12 +02:00