scale up transformer
This commit is contained in:
@ -239,10 +239,10 @@ class CleanTradingDashboard:
|
||||
from NN.models.advanced_transformer_trading import create_trading_transformer, TradingTransformerConfig
|
||||
|
||||
config = TradingTransformerConfig(
|
||||
d_model=1024, # 2x increase for 46M parameters
|
||||
n_heads=16, # 2x increase
|
||||
n_layers=12, # 2x increase
|
||||
seq_len=150, # 1.5x increase
|
||||
d_model=512, # Optimized for 46M parameters
|
||||
n_heads=8, # Optimized
|
||||
n_layers=8, # Optimized
|
||||
seq_len=100, # Optimized
|
||||
n_actions=3,
|
||||
use_multi_scale_attention=True,
|
||||
use_market_regime_detection=True,
|
||||
@ -4603,10 +4603,10 @@ class CleanTradingDashboard:
|
||||
# Create transformer if not exists
|
||||
if transformer_model is None or transformer_trainer is None:
|
||||
config = TradingTransformerConfig(
|
||||
d_model=1024, # 2x increase for 46M parameters
|
||||
n_heads=16, # 2x increase
|
||||
n_layers=12, # 2x increase
|
||||
seq_len=150, # 1.5x increase
|
||||
d_model=512, # Optimized for 46M parameters
|
||||
n_heads=8, # Optimized
|
||||
n_layers=8, # Optimized
|
||||
seq_len=100, # Optimized
|
||||
n_actions=3,
|
||||
use_multi_scale_attention=True,
|
||||
use_market_regime_detection=True,
|
||||
|
@ -200,98 +200,64 @@ class DashboardLayoutManager:
|
||||
])
|
||||
|
||||
def _create_cob_and_trades_row(self):
|
||||
"""Creates the row for COB ladders, closed trades, and model status."""
|
||||
return html.Div(
|
||||
[
|
||||
"""Creates the row for COB ladders, closed trades, and model status - REORGANIZED LAYOUT"""
|
||||
return html.Div([
|
||||
# Top row: COB Ladders (left) and Models/Training (right)
|
||||
html.Div([
|
||||
# Left side: COB Ladders (60% width)
|
||||
html.Div(
|
||||
[
|
||||
html.Div([
|
||||
html.Div([
|
||||
# ETH/USDT COB
|
||||
html.Div([
|
||||
html.Div(
|
||||
id="eth-cob-content",
|
||||
className="card-body p-2",
|
||||
)
|
||||
], className="card", style={"flex": "1"}),
|
||||
|
||||
# BTC/USDT COB
|
||||
html.Div([
|
||||
html.Div(
|
||||
id="btc-cob-content",
|
||||
className="card-body p-2",
|
||||
)
|
||||
], className="card", style={"flex": "1", "marginLeft": "1rem"}),
|
||||
], className="d-flex")
|
||||
], style={"width": "60%"}),
|
||||
|
||||
# Right side: Models & Training Progress (40% width) - MOVED UP
|
||||
html.Div([
|
||||
html.Div([
|
||||
html.Div([
|
||||
html.H6([
|
||||
html.I(className="fas fa-brain me-2"),
|
||||
"Models & Training Progress",
|
||||
], className="card-title mb-2"),
|
||||
html.Div(
|
||||
id="training-metrics",
|
||||
style={"height": "300px", "overflowY": "auto"}, # Increased height
|
||||
),
|
||||
], className="card-body p-2")
|
||||
], className="card")
|
||||
], style={"width": "38%", "marginLeft": "2%"}),
|
||||
], className="d-flex mb-3"),
|
||||
|
||||
# Bottom row: Closed Trades (full width) - MOVED BELOW COB
|
||||
html.Div([
|
||||
html.Div([
|
||||
html.Div([
|
||||
html.H6([
|
||||
html.I(className="fas fa-history me-2"),
|
||||
"Recent Closed Trades",
|
||||
], className="card-title mb-2"),
|
||||
html.Div(
|
||||
[
|
||||
# ETH/USDT COB
|
||||
html.Div(
|
||||
[
|
||||
html.Div(
|
||||
id="eth-cob-content",
|
||||
className="card-body p-2",
|
||||
)
|
||||
],
|
||||
className="card",
|
||||
style={"flex": "1"},
|
||||
),
|
||||
# BTC/USDT COB
|
||||
html.Div(
|
||||
[
|
||||
html.Div(
|
||||
id="btc-cob-content",
|
||||
className="card-body p-2",
|
||||
)
|
||||
],
|
||||
className="card",
|
||||
style={"flex": "1", "marginLeft": "1rem"},
|
||||
),
|
||||
],
|
||||
className="d-flex",
|
||||
)
|
||||
],
|
||||
style={"width": "60%"},
|
||||
),
|
||||
# Right side: Trades and Model Status (40% width)
|
||||
html.Div(
|
||||
[
|
||||
# Closed Trades
|
||||
html.Div(
|
||||
[
|
||||
html.Div(
|
||||
[
|
||||
html.H6(
|
||||
[
|
||||
html.I(className="fas fa-history me-2"),
|
||||
"Closed Trades",
|
||||
],
|
||||
className="card-title mb-2",
|
||||
),
|
||||
html.Div(
|
||||
id="closed-trades-table",
|
||||
style={"height": "250px", "overflowY": "auto"},
|
||||
),
|
||||
],
|
||||
className="card-body p-2",
|
||||
)
|
||||
],
|
||||
className="card mb-3",
|
||||
id="closed-trades-table",
|
||||
style={"height": "200px", "overflowY": "auto"}, # Reduced height
|
||||
),
|
||||
# Model Status
|
||||
html.Div(
|
||||
[
|
||||
html.Div(
|
||||
[
|
||||
html.H6(
|
||||
[
|
||||
html.I(className="fas fa-brain me-2"),
|
||||
"Models & Training Progress",
|
||||
],
|
||||
className="card-title mb-2",
|
||||
),
|
||||
html.Div(
|
||||
id="training-metrics",
|
||||
style={
|
||||
"height": "250px",
|
||||
"overflowY": "auto",
|
||||
},
|
||||
),
|
||||
],
|
||||
className="card-body p-2",
|
||||
)
|
||||
],
|
||||
className="card",
|
||||
),
|
||||
],
|
||||
style={"width": "38%", "marginLeft": "2%"},
|
||||
),
|
||||
],
|
||||
className="d-flex mb-3",
|
||||
)
|
||||
], className="card-body p-2")
|
||||
], className="card")
|
||||
])
|
||||
])
|
||||
|
||||
def _create_analytics_and_performance_row(self):
|
||||
"""Create the combined analytics and performance row with COB data, trades, and training progress"""
|
||||
|
Reference in New Issue
Block a user