log hyperopt progress to stdout instead to the logger

This commit is contained in:
gcarq
2018-03-25 22:57:40 +02:00
parent f374a062e1
commit 611bb52d1f
2 changed files with 5 additions and 4 deletions

View File

@@ -217,13 +217,13 @@ class Hyperopt(Backtesting):
"""
if results['loss'] < self.current_best_loss:
self.current_best_loss = results['loss']
log_msg = '{:5d}/{}: {}. Loss {:.5f}'.format(
log_msg = '\n{:5d}/{}: {}. Loss {:.5f}'.format(
results['current_tries'],
results['total_tries'],
results['result'],
results['loss']
)
logger.info(log_msg)
print(log_msg)
else:
print('.', end='')
sys.stdout.flush()