Upload alpha_factory/orchestration/pipeline.py
Browse files
alpha_factory/orchestration/pipeline.py
CHANGED
|
@@ -22,7 +22,6 @@ from ..personas import (
|
|
| 22 |
gate_alpha,
|
| 23 |
)
|
| 24 |
from ..schemas import Verdict, BrainMetrics
|
| 25 |
-
from ..local.brain_sim import simulate_alpha_local, sign_sweep_local
|
| 26 |
from ..data.brain_groups import get_group_for_expression
|
| 27 |
|
| 28 |
console = Console()
|
|
@@ -60,8 +59,7 @@ class AlphaPipeline:
|
|
| 60 |
f"[bold green]Alpha Factory v0.2.0[/] -- Batch of {batch_size} candidates\n"
|
| 61 |
f"[dim]{datetime.now().strftime('%Y-%m-%d %H:%M:%S')}[/]\n"
|
| 62 |
f"Mode: {'PROVEN TEMPLATES' if self.config.use_proven_templates else 'LLM GENERATION'} | "
|
| 63 |
-
f"BRAIN: {'LIVE' if self.config.enable_brain_client else 'DRY-RUN'}
|
| 64 |
-
f"Local Sim: {'ON' if self.config.enable_local_sim else 'OFF'}",
|
| 65 |
title="Pipeline Start"
|
| 66 |
))
|
| 67 |
|
|
@@ -199,14 +197,7 @@ class AlphaPipeline:
|
|
| 199 |
academic_anchor=None,
|
| 200 |
)
|
| 201 |
|
| 202 |
-
# STEP 7:
|
| 203 |
-
local_pass = True
|
| 204 |
-
if self.config.enable_local_sim:
|
| 205 |
-
# Proven template mode skips local sim (templates are pre-validated)
|
| 206 |
-
# But we could add it here for triage
|
| 207 |
-
pass
|
| 208 |
-
|
| 209 |
-
# STEP 8: BRAIN submission
|
| 210 |
verdict = await self._submit_or_dryrun(alpha_id, expr, alpha["neutralization"], alpha["decay"])
|
| 211 |
|
| 212 |
if verdict == Verdict.PROMOTE:
|
|
@@ -299,14 +290,7 @@ class AlphaPipeline:
|
|
| 299 |
family_id=alpha_id[:8],
|
| 300 |
)
|
| 301 |
|
| 302 |
-
# STEP 7:
|
| 303 |
-
if self.config.enable_local_sim:
|
| 304 |
-
# Note: Local sim needs price data which requires yfinance
|
| 305 |
-
# For now, skip and rely on BRAIN for validation
|
| 306 |
-
# TODO: integrate yfinance data download and local sim
|
| 307 |
-
pass
|
| 308 |
-
|
| 309 |
-
# STEP 8: Crowd Scout — novelty check
|
| 310 |
# Compute a synthetic correlation based on fields/archetype overlap
|
| 311 |
max_corr = self._estimate_correlation(expression, existing_hashes)
|
| 312 |
crowd_result = await scout_novelty(
|
|
@@ -459,4 +443,4 @@ class AlphaPipeline:
|
|
| 459 |
|
| 460 |
def close(self):
|
| 461 |
self.store.close()
|
| 462 |
-
self.winner_memory.close()
|
|
|
|
| 22 |
gate_alpha,
|
| 23 |
)
|
| 24 |
from ..schemas import Verdict, BrainMetrics
|
|
|
|
| 25 |
from ..data.brain_groups import get_group_for_expression
|
| 26 |
|
| 27 |
console = Console()
|
|
|
|
| 59 |
f"[bold green]Alpha Factory v0.2.0[/] -- Batch of {batch_size} candidates\n"
|
| 60 |
f"[dim]{datetime.now().strftime('%Y-%m-%d %H:%M:%S')}[/]\n"
|
| 61 |
f"Mode: {'PROVEN TEMPLATES' if self.config.use_proven_templates else 'LLM GENERATION'} | "
|
| 62 |
+
f"BRAIN: {'LIVE' if self.config.enable_brain_client else 'DRY-RUN'}",
|
|
|
|
| 63 |
title="Pipeline Start"
|
| 64 |
))
|
| 65 |
|
|
|
|
| 197 |
academic_anchor=None,
|
| 198 |
)
|
| 199 |
|
| 200 |
+
# STEP 7: BRAIN submission
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 201 |
verdict = await self._submit_or_dryrun(alpha_id, expr, alpha["neutralization"], alpha["decay"])
|
| 202 |
|
| 203 |
if verdict == Verdict.PROMOTE:
|
|
|
|
| 290 |
family_id=alpha_id[:8],
|
| 291 |
)
|
| 292 |
|
| 293 |
+
# STEP 7: Crowd Scout — novelty check
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 294 |
# Compute a synthetic correlation based on fields/archetype overlap
|
| 295 |
max_corr = self._estimate_correlation(expression, existing_hashes)
|
| 296 |
crowd_result = await scout_novelty(
|
|
|
|
| 443 |
|
| 444 |
def close(self):
|
| 445 |
self.store.close()
|
| 446 |
+
self.winner_memory.close()
|