fix: 4 critical optimizer bugs
- NaN composite score: dropna().mean() on empty series returns NaN, nan is truthy so (nan or 0)=nan. Fixed: use None when no MFE data so scorer uses 0.5 fallback instead of propagating NaN. - Analysis stopping: gate WFV was importing from main.execute_run (old CLI code that uses broken runner). Fixed: gate.run_walk_forward now accepts an executor callable from optimizer_loop. - Back to Dashboard opened blank tab: Reports button used window.open(_blank). Fixed: same-tab navigation + history.back(). - NaN in reports card: downstream of composite_score NaN above.
This commit is contained in:
@@ -39,7 +39,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<button class="btn btn-secondary" id="btn-reports" onclick="window.open('/reports','_blank')">
|
||||
<button class="btn btn-secondary" id="btn-reports" onclick="window.location.href='/reports'">
|
||||
📁 Reports
|
||||
</button>
|
||||
<button class="btn btn-pause hidden" id="btn-pause" onclick="pauseOptimizer()">
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
<h1>📁 Optimization Reports</h1>
|
||||
<div class="sub">{{ runs|length }} run(s) recorded · Click any card to open the full report</div>
|
||||
</div>
|
||||
<a class="back-link" href="/">← Back to Dashboard</a>
|
||||
<a class="back-link" href="/" onclick="if(document.referrer){{history.back();return false;}}">← Back to Dashboard</a>
|
||||
</header>
|
||||
|
||||
{% if not runs %}
|
||||
|
||||
Reference in New Issue
Block a user