hyperopt - freqai - docs and refactoring

This commit is contained in:
Wagner Costa Santos
2022-09-06 15:42:47 -03:00
parent 1820bc6832
commit 8d16dd804d
5 changed files with 29 additions and 111 deletions

View File

@@ -285,6 +285,7 @@ class Configuration:
logger.info('Parameter --stoplosses detected: %s ...', self.args["stoploss_range"])
# Hyperopt section
self._check_hyperopt_analyze_per_epoch_freqai()
self._args_to_config(config, argname='hyperopt',
logstring='Using Hyperopt class name: {}')
@@ -537,3 +538,12 @@ class Configuration:
config['pairs'] = load_file(pairs_file)
if 'pairs' in config and isinstance(config['pairs'], list):
config['pairs'].sort()
def _check_hyperopt_analyze_per_epoch_freqai(self) -> None:
"""
Helper for block hyperopt with analyze-per-epoch param.
"""
if ("analyze_per_epoch" in self.args and
self.args["analyze_per_epoch"] and "freqaimodel" in self.args):
raise OperationalException('analyze-per-epoch parameter is \
not allowed with a Freqai strategy.')