feat(strategy-optimizer): Strategy Optimizer via algorithme évolutionnaire (GH-32)#33
Merged
Merged
Conversation
…ampaigns - Create StrategyOptimizerCampaign model (status, config, params, score tracking) - Create StrategyOptimizerEvaluation model (iteration-level results) - Register models in __init__.py - Add migration 0015 with indexes on strategy_id and campaign_id Part of GH-32
…ry loop - Add optimizer_bounds.py: parameter bounds for all 20 templates - Add optimizer_adapter.py: encode/decode params, bounds validation, evaluator factory - Add optimizer_service.py: campaign CRUD + main optimization loop with mutation - Add config settings: queue, time limits, iteration limits Part of GH-32
- Create optimizer_task.py: execute(campaign_id) with soft/hard time limits - Register in celery_app.py include list and task_routes - Route to dedicated 'strategy-optimizer' queue (isolated from backtests) - Add openevolve>=0.1.0 to requirements.txt Part of GH-32
…ycle
- POST /strategies/{id}/optimize: launch campaign (201)
- GET /strategies/{id}/optimizer-campaign: poll status
- POST /optimizer-campaign/{id}/accept: apply best_params
- POST /optimizer-campaign/{id}/reject: discard results
- DELETE /optimizer-campaign/{id}: cancel running campaign (204)
- Add OptimizerLaunchRequest and OptimizerCampaignOut schemas
- Error codes: 409 conflict, 422 invalid state, 404 not found
Part of GH-32
- Add 5 API methods to client.ts (launch, poll, accept, reject, cancel) - Create OptimizerPanel.tsx: config modal, progress bar, results with diff - Integrate panel into StrategyCard for VALIDATED strategies - TypeScript strict: no errors (tsc --noEmit passes) Part of GH-32
- test_optimizer_service.py: 7 tests (CRUD, state transitions, uniqueness) - test_optimizer_adapter.py: 10 tests (roundtrip, bounds, evaluator) - test_optimizer_api.py: API endpoint status codes (201, 422, 409, 404, 204) - All 17 tests pass Part of GH-32
…utation and MAP-Elites
…ead of config_path=
…nfig instead of YAML
…e (daemon process workaround)
…nEvolve subprocess execution
…ocess stops on user cancel
…tatus in page guard
…_DISCARDED display label)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Résumé
strategy-optimizer(isolation du pipeline)Changements
Backend
strategy_optimizer_campaigns,strategy_optimizer_evaluations0016_strategy_optimizer_tablesStrategyOptimizer(boucle évolutionnaire avec mutation ±20% des params)optimizer_bounds.py)run_strategy_optimizationsur queue dédiéeFrontend
OptimizerPanel.tsx(progression + résultat + actions)Tests
tsc --noEmit: 0 erreurIssue liée
Closes #32
Tests exécutés
Résultat : ✅
Risques
Checklist
backend/app/risk/