Move --customhyperopts to hyperopt section
This commit is contained in:
parent
b7a558b951
commit
2d0aca0d20
@ -108,14 +108,6 @@ class Arguments(object):
|
|||||||
type=str,
|
type=str,
|
||||||
metavar='PATH',
|
metavar='PATH',
|
||||||
)
|
)
|
||||||
self.parser.add_argument(
|
|
||||||
'--customhyperopt',
|
|
||||||
help='Specify hyperopt class name (default: %(default)s).',
|
|
||||||
dest='hyperopt',
|
|
||||||
default=constants.DEFAULT_HYPEROPT,
|
|
||||||
type=str,
|
|
||||||
metavar='NAME',
|
|
||||||
)
|
|
||||||
self.parser.add_argument(
|
self.parser.add_argument(
|
||||||
'--dynamic-whitelist',
|
'--dynamic-whitelist',
|
||||||
help='Dynamically generate and update whitelist'
|
help='Dynamically generate and update whitelist'
|
||||||
@ -248,6 +240,14 @@ class Arguments(object):
|
|||||||
"""
|
"""
|
||||||
Parses given arguments for Hyperopt scripts.
|
Parses given arguments for Hyperopt scripts.
|
||||||
"""
|
"""
|
||||||
|
parser.add_argument(
|
||||||
|
'--customhyperopt',
|
||||||
|
help='Specify hyperopt class name (default: %(default)s).',
|
||||||
|
dest='hyperopt',
|
||||||
|
default=constants.DEFAULT_HYPEROPT,
|
||||||
|
type=str,
|
||||||
|
metavar='NAME',
|
||||||
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--eps', '--enable-position-stacking',
|
'--eps', '--enable-position-stacking',
|
||||||
help='Allow buying the same pair multiple times (position stacking).',
|
help='Allow buying the same pair multiple times (position stacking).',
|
||||||
|
@ -67,9 +67,6 @@ class Configuration(object):
|
|||||||
if self.args.strategy_path:
|
if self.args.strategy_path:
|
||||||
config.update({'strategy_path': self.args.strategy_path})
|
config.update({'strategy_path': self.args.strategy_path})
|
||||||
|
|
||||||
# Add the hyperopt file to use
|
|
||||||
config.update({'hyperopt': self.args.hyperopt})
|
|
||||||
|
|
||||||
# Load Common configuration
|
# Load Common configuration
|
||||||
config = self._load_common_config(config)
|
config = self._load_common_config(config)
|
||||||
|
|
||||||
@ -276,6 +273,11 @@ class Configuration(object):
|
|||||||
Extract information for sys.argv and load Hyperopt configuration
|
Extract information for sys.argv and load Hyperopt configuration
|
||||||
:return: configuration as dictionary
|
:return: configuration as dictionary
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
if "hyperopt" in self.args:
|
||||||
|
# Add the hyperopt file to use
|
||||||
|
config.update({'hyperopt': self.args.hyperopt})
|
||||||
|
|
||||||
# If --epochs is used we add it to the configuration
|
# If --epochs is used we add it to the configuration
|
||||||
if 'epochs' in self.args and self.args.epochs:
|
if 'epochs' in self.args and self.args.epochs:
|
||||||
config.update({'epochs': self.args.epochs})
|
config.update({'epochs': self.args.epochs})
|
||||||
|
Loading…
Reference in New Issue
Block a user