Initial work on csv-file export. Missing docs and tests

This commit is contained in:
Fredrik81
2020-03-05 01:58:33 +01:00
parent 57523d58df
commit 7606d814fa
5 changed files with 81 additions and 1 deletions

View File

@@ -21,6 +21,7 @@ def start_hyperopt_list(args: Dict[str, Any]) -> None:
print_colorized = config.get('print_colorized', False)
print_json = config.get('print_json', False)
export_csv = config.get('export_csv', None)
no_details = config.get('hyperopt_list_no_details', False)
no_header = False
@@ -59,6 +60,17 @@ def start_hyperopt_list(args: Dict[str, Any]) -> None:
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] == '+':
overwrite_csv = True
export_csv = export_csv[1:]
Hyperopt.export_csv_file(
config, trials, total_epochs,
not filteroptions['only_best'], export_csv, overwrite_csv
)
def start_hyperopt_show(args: Dict[str, Any]) -> None: