Dump parameters from hyperopt-show

This commit is contained in:
Matthias
2021-05-29 16:49:28 +02:00
parent 750c780293
commit 2bf17f71e7
2 changed files with 38 additions and 2 deletions

View File

@@ -129,9 +129,15 @@ def start_hyperopt_show(args: Dict[str, Any]) -> None:
metrics = val['results_metrics']
if 'strategy_name' in metrics:
show_backtest_result(metrics['strategy_name'], metrics,
strategy_name = metrics['strategy_name']
show_backtest_result(strategy_name, metrics,
metrics['stake_currency'])
# Export parameters ...
# TODO: make this optional? otherwise it'll overwrite previous parameters ...
fn = HyperoptTools.get_strategy_filename(config, strategy_name)
HyperoptTools.export_params(val, strategy_name, fn.with_suffix('.json'))
HyperoptTools.show_epoch_details(val, total_epochs, print_json, no_header,
header_str="Epoch details")