Replace calls to load_data

This commit is contained in:
Matthias
2018-12-15 13:55:16 +01:00
parent f261911285
commit 21aba1620c
5 changed files with 11 additions and 9 deletions

View File

@@ -370,7 +370,7 @@ class Backtesting(object):
timerange = Arguments.parse_timerange(None if self.config.get(
'timerange') is None else str(self.config.get('timerange')))
data = history.load_data(
self.config['datadir'],
Path(self.config.get('datadir')) if self.config.get('datadir') else None,
pairs=pairs,
ticker_interval=self.ticker_interval,
refresh_pairs=self.config.get('refresh_pairs', False),

View File

@@ -5,11 +5,12 @@ This module contains the hyperopt logic
"""
import logging
import multiprocessing
from argparse import Namespace
import os
import sys
from argparse import Namespace
from pathlib import Path
from math import exp
import multiprocessing
from operator import itemgetter
from typing import Any, Dict, List
@@ -240,7 +241,7 @@ class Hyperopt(Backtesting):
timerange = Arguments.parse_timerange(None if self.config.get(
'timerange') is None else str(self.config.get('timerange')))
data = load_data(
datadir=str(self.config.get('datadir')),
datadir=Path(self.config.get('datadir')) if self.config.get('datadir') else None,
pairs=self.config['exchange']['pair_whitelist'],
ticker_interval=self.ticker_interval,
timerange=timerange