Skip to content

Commit

Permalink
Merge pull request freqtrade#9523 from freqtrade/fix/freqai-append-bug
Browse files Browse the repository at this point in the history
Bugfix: ensure zeros are properly appended after each inference
  • Loading branch information
robcaulk authored Dec 10, 2023
2 parents b84a2fc + 78cb1e6 commit 020d4b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion freqtrade/freqai/data_drawer.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ def append_model_predictions(self, pair: str, predictions: DataFrame,
index = self.historic_predictions[pair].index[-1:]
columns = self.historic_predictions[pair].columns

zeros_df = pd.DataFrame(np.zeros, index=index, columns=columns)
zeros_df = pd.DataFrame(np.zeros((1, len(columns))), index=index, columns=columns)
self.historic_predictions[pair] = pd.concat(
[self.historic_predictions[pair], zeros_df], ignore_index=True, axis=0)
df = self.historic_predictions[pair]
Expand Down

0 comments on commit 020d4b5

Please sign in to comment.