add tests for spice_rack
This commit is contained in:
@@ -586,7 +586,6 @@ class FreqaiDataDrawer:
|
||||
pairs = self.freqai_info["feature_parameters"].get(
|
||||
"include_corr_pairlist", []
|
||||
)
|
||||
|
||||
for tf in self.freqai_info["feature_parameters"].get("include_timeframes"):
|
||||
base_dataframes[tf] = dk.slice_dataframe(timerange, historic_data[pair][tf])
|
||||
if pairs:
|
||||
|
@@ -4,7 +4,8 @@
|
||||
"enabled": true,
|
||||
"purge_old_models": true,
|
||||
"train_period_days": 4,
|
||||
"identifier": "uniqe-id",
|
||||
"backtest_period_days": 2,
|
||||
"identifier": "spicy-id",
|
||||
"feature_parameters": {
|
||||
"include_timeframes": [
|
||||
"3m",
|
||||
|
@@ -161,9 +161,6 @@ class IStrategy(ABC, HyperStrategyMixin):
|
||||
from freqtrade.freqai.utils import auto_populate_any_indicators
|
||||
self.populate_any_indicators = types.MethodType( # type: ignore
|
||||
auto_populate_any_indicators, self)
|
||||
# funcType = type(IStrategy.populate_any_indicators)
|
||||
# self.populate_any_indicators = funcType(self.freqai.auto_populate_any_indicators,
|
||||
# self, self.populate_any_indicators)
|
||||
|
||||
self.freqai_info = self.config["freqai"]
|
||||
|
||||
@@ -192,8 +189,9 @@ class IStrategy(ABC, HyperStrategyMixin):
|
||||
def setup_freqai_spice_rack(self, config: dict) -> Dict[str, Any]:
|
||||
import json
|
||||
from pathlib import Path
|
||||
auto_config = config.get('freqai_config', 'lightgbm_config.json')
|
||||
with open(Path('freqtrade') / 'freqai' / 'spice_rack'
|
||||
/ 'lightgbm_config.json') as json_file:
|
||||
/ auto_config) as json_file:
|
||||
freqai_config = json.load(json_file)
|
||||
config['freqai'] = freqai_config['freqai']
|
||||
config['freqai']['identifier'] = config['freqai_identifier']
|
||||
|
Reference in New Issue
Block a user