Merge pull request #4838 from Antreasgr/fix-encoding-issue

Fix bug in running hyperopt in windows 10
This commit is contained in:
Matthias
2021-05-27 14:57:36 +01:00
committed by GitHub
5 changed files with 12 additions and 14 deletions

View File

@@ -1,6 +1,5 @@
import io
import locale
import logging
from collections import OrderedDict
from pathlib import Path
@@ -195,9 +194,9 @@ class HyperoptTools():
f"Avg profit {results_metrics['profit_mean'] * 100: 6.2f}%. "
f"Median profit {results_metrics['profit_median'] * 100: 6.2f}%. "
f"Total profit {results_metrics['profit_total_abs']: 11.8f} {stake_currency} "
f"({results_metrics['profit_total'] * 100: 7.2f}\N{GREEK CAPITAL LETTER SIGMA}%). "
f"({results_metrics['profit_total'] * 100: 7.2f}%). "
f"Avg duration {results_metrics['holding_avg']} min."
).encode(locale.getpreferredencoding(), 'replace').decode('utf-8')
)
@staticmethod
def _format_explanation_string(results, total_epochs) -> str: