Fix dataprovider in hyperopt.

This commit is contained in:
Rokas Kupstys 2021-05-02 16:35:06 +03:00
parent 6af4de8fe8
commit 6fb4d83ab3
2 changed files with 1 additions and 2 deletions

View File

@ -353,6 +353,7 @@ class Backtesting:
# Update dataprovider cache
for pair, dataframe in processed.items():
self.dataprovider._set_cached_df(pair, self.timeframe, dataframe)
self.strategy.dp = self.dataprovider
# Use dict of lists with data for performance
# (looping lists is a lot faster than pandas DataFrames)

View File

@ -372,8 +372,6 @@ class Hyperopt:
self.backtesting.exchange._api_async = None # type: ignore
# self.backtesting.exchange = None # type: ignore
self.backtesting.pairlists = None # type: ignore
self.backtesting.strategy.dp = None # type: ignore
IStrategy.dp = None # type: ignore
cpus = cpu_count()
logger.info(f"Found {cpus} CPU cores. Let's make them scream!")