Added tests and updated doc

This commit is contained in:
Fredrik81
2020-03-05 19:43:43 +01:00
parent 7606d814fa
commit 91db75a707
4 changed files with 27 additions and 8 deletions

View File

@@ -224,7 +224,8 @@ AVAILABLE_CLI_OPTIONS = {
"export_csv": Arg(
'--export-csv',
help='Export to CSV-File. Put + in front of filename to overwrite.'
'Example: --export-csv +hyperopt.csv',
' This will disable table print.'
' Example: --export-csv +hyperopt.csv',
metavar='FILE',
),
"hyperopt_jobs": Arg(

View File

@@ -50,17 +50,18 @@ def start_hyperopt_list(args: Dict[str, Any]) -> None:
if print_colorized:
colorama_init(autoreset=True)
try:
Hyperopt.print_result_table(config, trials, total_epochs,
not filteroptions['only_best'], print_colorized, 0)
except KeyboardInterrupt:
print('User interrupted..')
if not export_csv:
try:
Hyperopt.print_result_table(config, trials, total_epochs,
not filteroptions['only_best'], print_colorized, 0)
except KeyboardInterrupt:
print('User interrupted..')
if trials and not no_details:
sorted_trials = sorted(trials, key=itemgetter('loss'))
results = sorted_trials[0]
Hyperopt.print_epoch_details(results, total_epochs, print_json, no_header)
print(export_csv)
if trials and export_csv:
overwrite_csv = False
if export_csv[0] == '+':