keep model accessible in memory to avoid loading objects from disk during live/dry

This commit is contained in:
robcaulk
2022-05-19 19:27:38 +02:00
parent 67eb94c69d
commit 1fae6c9ef7
2 changed files with 26 additions and 10 deletions

View File

@@ -59,6 +59,9 @@ class FreqaiExampleStrategy(IStrategy):
informative_pairs.append((pair, tf))
return informative_pairs
def bot_start(self):
self.model = CustomModel(self.config)
def populate_any_indicators(self, pair, df, tf, informative=None, coin=""):
"""
Function designed to automatically generate, name and merge features
@@ -141,9 +144,6 @@ class FreqaiExampleStrategy(IStrategy):
self.freqai_info = self.config["freqai"]
self.pair = metadata['pair']
# the model is instantiated here
self.model = CustomModel(self.config)
print("Populating indicators...")
# the following loops are necessary for building the features