MISC
This commit is contained in:
@@ -154,7 +154,7 @@ class EnhancedRLTrainingAdapter:
|
||||
'direction': direction,
|
||||
'confidence': float(confidence),
|
||||
'action': action_names[action_idx],
|
||||
'model_state': state,
|
||||
'model_state': (state.tolist() if hasattr(state, 'tolist') else state),
|
||||
'context': context
|
||||
}
|
||||
except Exception as e:
|
||||
@@ -238,6 +238,8 @@ class EnhancedRLTrainingAdapter:
|
||||
|
||||
predicted_price = current_price * (1 + predicted_return) if (predicted_return is not None and current_price) else current_price
|
||||
|
||||
# Also attach DQN-formatted state if available for training consumption
|
||||
dqn_state = self._convert_to_dqn_state(base_data, context)
|
||||
return {
|
||||
'predicted_price': predicted_price,
|
||||
'current_price': current_price,
|
||||
@@ -246,6 +248,7 @@ class EnhancedRLTrainingAdapter:
|
||||
'predicted_return': predicted_return,
|
||||
'action': action,
|
||||
'model_output': model_output,
|
||||
'model_state': (dqn_state.tolist() if hasattr(dqn_state, 'tolist') else dqn_state),
|
||||
'context': context
|
||||
}
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user