fix bug in previous commit

This commit is contained in:
robcaulk 2022-05-30 12:48:22 +02:00
parent a20651efd8
commit e229902381
2 changed files with 5 additions and 4 deletions

View File

@ -86,14 +86,15 @@ class FreqaiDataDrawer:
# send pair to end of queue
self.pair_dict[pair]['priority'] = len(self.pair_dict)
def set_initial_return_values(self, pair, dh):
def set_initial_return_values(self, pair: str, dh):
self.model_return_values[pair] = {}
self.model_return_values[pair]['predictions'] = dh.full_predictions
self.model_return_values[pair]['do_preds'] = dh.full_do_predict
self.model_return_values[pair]['target_mean'] = dh.full_target_mean
self.model_return_values[pair]['target_std'] = dh.full_target_std
def append_model_predictions(self, pair, predictions, do_preds,
def append_model_predictions(self, pair: str, predictions, do_preds,
target_mean, target_std, dh) -> None:
pred_store = self.model_return_values[pair]['predictions']

View File

@ -227,8 +227,8 @@ class IFreqaiModel(ABC):
else:
preds, do_preds = self.predict(dataframe.iloc[-2:], dh)
self.data_drawer.append_model_predictions(metadata['pair'], preds, do_preds,
self.dh.data["target_mean"],
self.dh.data["target_std"], dh)
dh.data["target_mean"],
dh.data["target_std"], dh)
return dh