Skip to content

Commit ff7b1e0

Browse files
committed
chore: remove long-deprecated "--hyperopt" argument
1 parent b2aa392 commit ff7b1e0

File tree

5 files changed

+2
-23
lines changed

5 files changed

+2
-23
lines changed

freqtrade/commands/arguments.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@
6464

6565
ARGS_HYPEROPT = [
6666
*ARGS_COMMON_OPTIMIZE,
67-
"hyperopt",
6867
"hyperopt_path",
6968
"position_stacking",
7069
"enable_protections",

freqtrade/commands/cli_options.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Definition of cli arguments used in arguments.py
33
"""
44

5-
from argparse import SUPPRESS, ArgumentTypeError
5+
from argparse import ArgumentTypeError
66

77
from freqtrade import constants
88
from freqtrade.constants import HYPEROPT_LOSS_BUILTIN
@@ -256,12 +256,6 @@ def __init__(self, *args, **kwargs):
256256
choices=constants.BACKTEST_CACHE_AGE,
257257
),
258258
# Hyperopt
259-
"hyperopt": Arg(
260-
"--hyperopt",
261-
help=SUPPRESS,
262-
metavar="NAME",
263-
required=False,
264-
),
265259
"hyperopt_path": Arg(
266260
"--hyperopt-path",
267261
help="Specify additional lookup path for Hyperopt Loss functions.",

freqtrade/configuration/configuration.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,6 @@ def _process_optimize_options(self, config: Config) -> None:
336336
# Hyperopt section
337337

338338
configurations = [
339-
("hyperopt", "Using Hyperopt class name: {}"),
340339
("hyperopt_path", "Using additional Hyperopt lookup path: {}"),
341340
("hyperoptexportfilename", "Using hyperopt file: {}"),
342341
("lookahead_analysis_exportfilename", "Saving lookahead analysis results into {} ..."),

freqtrade/optimize/hyperopt/hyperopt.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
from freqtrade.constants import FTHYPT_FILEVERSION, LAST_BT_RESULT_FN, Config
2020
from freqtrade.enums import HyperoptState
21-
from freqtrade.exceptions import OperationalException
2221
from freqtrade.misc import file_dump_json, plural
2322
from freqtrade.optimize.hyperopt.hyperopt_optimizer import INITIAL_POINTS, HyperOptimizer
2423
from freqtrade.optimize.hyperopt.hyperopt_output import HyperoptOutput
@@ -50,12 +49,6 @@ def __init__(self, config: Config) -> None:
5049
self.analyze_per_epoch = self.config.get("analyze_per_epoch", False)
5150
HyperoptStateContainer.set_state(HyperoptState.STARTUP)
5251

53-
if self.config.get("hyperopt"):
54-
raise OperationalException(
55-
"Using separate Hyperopt files has been removed in 2021.9. Please convert "
56-
"your existing Hyperopt file to the new Hyperoptable strategy interface"
57-
)
58-
5952
time_now = datetime.now().strftime("%Y-%m-%d_%H-%M-%S")
6053
strategy = str(self.config["strategy"])
6154
self.results_file: Path = (

freqtrade/optimize/hyperopt/hyperopt_optimizer.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,7 @@ def __init__(self, config: Config, data_pickle_file: Path) -> None:
8989
self.custom_hyperopt: HyperOptAuto
9090
self.analyze_per_epoch = self.config.get("analyze_per_epoch", False)
9191

92-
if not self.config.get("hyperopt"):
93-
self.custom_hyperopt = HyperOptAuto(self.config)
94-
else:
95-
raise OperationalException(
96-
"Using separate Hyperopt files has been removed in 2021.9. Please convert "
97-
"your existing Hyperopt file to the new Hyperoptable strategy interface"
98-
)
92+
self.custom_hyperopt = HyperOptAuto(self.config)
9993

10094
self.backtesting._set_strategy(self.backtesting.strategylist[0])
10195
self.custom_hyperopt.strategy = self.backtesting.strategy

0 commit comments

Comments
 (0)