Remove old print option for hyperopt-list and made table as default

This commit is contained in:
Fredrik81
2020-02-24 00:33:01 +01:00
parent 09226fd5d5
commit 7eb62ed32e
6 changed files with 6 additions and 46 deletions

View File

@@ -66,8 +66,7 @@ ARGS_HYPEROPT_LIST = ["hyperopt_list_best", "hyperopt_list_profitable",
"hyperopt_list_min_avg_time", "hyperopt_list_max_avg_time",
"hyperopt_list_min_avg_profit", "hyperopt_list_max_avg_profit",
"hyperopt_list_min_total_profit", "hyperopt_list_max_total_profit",
"print_colorized", "print_json", "print_table",
"hyperopt_list_no_details"]
"print_colorized", "print_json", "hyperopt_list_no_details"]
ARGS_HYPEROPT_SHOW = ["hyperopt_list_best", "hyperopt_list_profitable", "hyperopt_show_index",
"print_json", "hyperopt_show_no_header"]

View File

@@ -220,12 +220,6 @@ AVAILABLE_CLI_OPTIONS = {
action='store_true',
default=False,
),
"print_table": Arg(
'--print-table',
help='Print results in table format.',
action='store_true',
default=False,
),
"hyperopt_jobs": Arg(
'-j', '--job-workers',
help='The number of concurrently running jobs for hyperoptimization '

View File

@@ -21,7 +21,6 @@ def start_hyperopt_list(args: Dict[str, Any]) -> None:
print_colorized = config.get('print_colorized', False)
print_json = config.get('print_json', False)
print_table = config.get('print_table', False)
no_details = config.get('hyperopt_list_no_details', False)
no_header = False
@@ -47,26 +46,14 @@ def start_hyperopt_list(args: Dict[str, Any]) -> None:
trials = _hyperopt_filter_trials(trials, filteroptions)
# TODO: fetch the interval for epochs to print from the cli option
epoch_start, epoch_stop = 0, None
if print_colorized:
colorama_init(autoreset=True)
if print_table:
try:
Hyperopt.print_result_table(config, trials, total_epochs,
not filteroptions['only_best'], print_colorized)
except KeyboardInterrupt:
print('User interrupted..')
else:
try:
# Human-friendly indexes used here (starting from 1)
for val in trials[epoch_start:epoch_stop]:
Hyperopt.print_results_explanation(val, total_epochs,
not filteroptions['only_best'], print_colorized)
except KeyboardInterrupt:
print('User interrupted..')
try:
Hyperopt.print_result_table(config, trials, total_epochs,
not filteroptions['only_best'], print_colorized)
except KeyboardInterrupt:
print('User interrupted..')
if trials and not no_details:
sorted_trials = sorted(trials, key=itemgetter('loss'))