dash and training wip
This commit is contained in:
@@ -731,7 +731,8 @@ class RealtimeRLCOBTrader:
|
||||
with self.training_lock:
|
||||
# Check if we have enough data for training
|
||||
predictions = list(self.prediction_history[symbol])
|
||||
if len(predictions) < 10:
|
||||
# Train with fewer samples to kickstart learning
|
||||
if len(predictions) < 6:
|
||||
return
|
||||
|
||||
# Calculate rewards for recent predictions
|
||||
@@ -739,11 +740,11 @@ class RealtimeRLCOBTrader:
|
||||
|
||||
# Filter predictions with calculated rewards
|
||||
training_predictions = [p for p in predictions if p.reward is not None]
|
||||
if len(training_predictions) < 5:
|
||||
if len(training_predictions) < 3:
|
||||
return
|
||||
|
||||
# Prepare training batch
|
||||
batch_size = min(32, len(training_predictions))
|
||||
batch_size = min(16, len(training_predictions))
|
||||
batch_predictions = training_predictions[-batch_size:]
|
||||
|
||||
# Train model
|
||||
|
||||
Reference in New Issue
Block a user