Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
MMCV
Commits
c203419f
Unverified
Commit
c203419f
authored
Apr 27, 2020
by
Harry
Committed by
GitHub
Apr 27, 2020
Browse files
fix: deadlock if processes have different log_buffer (#252)
parent
0c34ab90
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
mmcv/runner/hooks/logger/text.py
mmcv/runner/hooks/logger/text.py
+5
-2
No files found.
mmcv/runner/hooks/logger/text.py
View file @
c203419f
...
...
@@ -98,13 +98,16 @@ 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
torch
.
cuda
.
is_available
()
:
log_dict
[
'memory'
]
=
self
.
_get_max_memory
(
runner
)
if
memory
is
not
None
:
log_dict
[
'memory'
]
=
memory
for
name
,
val
in
runner
.
log_buffer
.
output
.
items
():
if
name
in
[
'time'
,
'data_time'
]:
continue
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment