Fix Deadlock fix (#256)

* Fix Deadlock fix

Resolves #255

* Revert deadlock fix and fix of deadlock fix

This reverts commit af85591fc7.
pull/261/head
Maxim Bonnaerens 2020-04-29 17:38:19 +02:00 committed by GitHub
parent d27f1f05a8
commit 89f709e8e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 5 deletions

View File

@ -124,16 +124,13 @@ class TextLoggerHook(LoggerHook):
log_dict['iter'] = runner.inner_iter + 1
# only record lr of the first param group
log_dict['lr'] = runner.current_lr()[0]
memory = None
if torch.cuda.is_available():
memory = self._get_max_memory(runner)
if mode == 'train':
log_dict['time'] = runner.log_buffer.output['time']
log_dict['data_time'] = runner.log_buffer.output['data_time']
# statistic memory
if memory is not None:
log_dict['memory'] = memory
if torch.cuda.is_available():
log_dict['memory'] = self._get_max_memory(runner)
for name, val in runner.log_buffer.output.items():
if name in ['time', 'data_time']:
continue