Remove hyperopt-loss default option
Force users to make a concious choice on a hyperopt-loss function
This commit is contained in:
@@ -7,7 +7,7 @@ import logging
|
||||
from pathlib import Path
|
||||
from typing import Dict
|
||||
|
||||
from freqtrade.constants import DEFAULT_HYPEROPT_LOSS, USERPATH_HYPEROPTS
|
||||
from freqtrade.constants import USERPATH_HYPEROPTS
|
||||
from freqtrade.exceptions import OperationalException
|
||||
from freqtrade.optimize.hyperopt_interface import IHyperOpt
|
||||
from freqtrade.optimize.hyperopt_loss_interface import IHyperOptLoss
|
||||
@@ -70,10 +70,10 @@ class HyperOptLossResolver(IResolver):
|
||||
:param config: configuration dictionary
|
||||
"""
|
||||
|
||||
# Verify the hyperopt_loss is in the configuration, otherwise fallback to the
|
||||
# default hyperopt loss
|
||||
hyperoptloss_name = config.get('hyperopt_loss') or DEFAULT_HYPEROPT_LOSS
|
||||
|
||||
hyperoptloss_name = config.get('hyperopt_loss')
|
||||
if not hyperoptloss_name:
|
||||
raise OperationalException("No Hyperopt loss set. Please use `--hyperopt-loss` to "
|
||||
"specify the Hyperopt-Loss class to use.")
|
||||
hyperoptloss = HyperOptLossResolver.load_object(hyperoptloss_name,
|
||||
config, kwargs={},
|
||||
extra_dir=config.get('hyperopt_path'))
|
||||
|
Reference in New Issue
Block a user