chore: improve help wording

This commit is contained in:
Matthias
2025-11-05 20:53:12 +01:00
parent f214942ff1
commit 68dea691c2
4 changed files with 17 additions and 10 deletions

View File

@@ -55,10 +55,11 @@ options:
-e INT, --epochs INT Specify number of epochs (default: 100). -e INT, --epochs INT Specify number of epochs (default: 100).
--spaces SPACES [SPACES ...] --spaces SPACES [SPACES ...]
Specify which parameters to hyperopt. Space-separated Specify which parameters to hyperopt. Space-separated
list. Available options: all, buy, sell, roi, list. Available builtin options (custom spaces will
stoploss, trailing, protection, trades, default. not be listed here): default, all, buy, sell, roi,
Default: `default` - which includes all spaces except stoploss, trailing, protection, trades. Default:
for 'trailing', 'protection', and 'trades'. `default` - which includes all spaces except for
'trailing', 'protection', and 'trades'.
--print-all Print all results, not only the best ones. --print-all Print all results, not only the best ones.
--print-json Print output in JSON format. --print-json Print output in JSON format.
-j JOBS, --job-workers JOBS -j JOBS, --job-workers JOBS

View File

@@ -5,7 +5,10 @@ Definition of cli arguments used in arguments.py
from argparse import ArgumentTypeError from argparse import ArgumentTypeError
from freqtrade import constants from freqtrade import constants
from freqtrade.constants import HYPEROPT_BUILTIN_SPACES, HYPEROPT_LOSS_BUILTIN from freqtrade.constants import (
HYPEROPT_BUILTIN_SPACE_OPTIONS,
HYPEROPT_LOSS_BUILTIN,
)
from freqtrade.enums import CandleType from freqtrade.enums import CandleType
@@ -278,9 +281,12 @@ AVAILABLE_CLI_OPTIONS = {
), ),
"spaces": Arg( "spaces": Arg(
"--spaces", "--spaces",
help="Specify which parameters to hyperopt. Space-separated list. Available options: " help=(
f"{', '.join(HYPEROPT_BUILTIN_SPACES)}. Default: `default` - " "Specify which parameters to hyperopt. Space-separated list. "
"which includes all spaces except for 'trailing', 'protection', and 'trades'.", "Available builtin options (custom spaces will not be listed here): "
f"{', '.join(HYPEROPT_BUILTIN_SPACE_OPTIONS)}. Default: `default` - "
"which includes all spaces except for 'trailing', 'protection', and 'trades'."
),
nargs="+", nargs="+",
), ),
"analyze_per_epoch": Arg( "analyze_per_epoch": Arg(

View File

@@ -42,7 +42,6 @@ HYPEROPT_LOSS_BUILTIN = [
"MultiMetricHyperOptLoss", "MultiMetricHyperOptLoss",
] ]
HYPEROPT_BUILTIN_SPACES = [ HYPEROPT_BUILTIN_SPACES = [
"all",
"buy", "buy",
"sell", "sell",
"roi", "roi",
@@ -50,8 +49,8 @@ HYPEROPT_BUILTIN_SPACES = [
"trailing", "trailing",
"protection", "protection",
"trades", "trades",
"default",
] ]
HYPEROPT_BUILTIN_SPACE_OPTIONS = ["default", "all"] + HYPEROPT_BUILTIN_SPACES
AVAILABLE_PAIRLISTS = [ AVAILABLE_PAIRLISTS = [
"StaticPairList", "StaticPairList",

View File

@@ -220,6 +220,7 @@ class HyperoptTools:
else: else:
all_spaces = list(params.keys() | non_optimized.keys()) all_spaces = list(params.keys() | non_optimized.keys())
# Explicitly listed to keep original sort order
spaces = ["buy", "sell", "protection", "roi", "stoploss", "trailing", "max_open_trades"] spaces = ["buy", "sell", "protection", "roi", "stoploss", "trailing", "max_open_trades"]
spaces += [s for s in all_spaces if s not in spaces] spaces += [s for s in all_spaces if s not in spaces]
lookup = { lookup = {