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
b74aa792
"src/vscode:/vscode.git/clone" did not exist on "610e2a6fd98126b5a2fc9bf223eae2cd7de5b032"
Unverified
Commit
b74aa792
authored
Nov 03, 2020
by
Wang Xinjiang
Committed by
GitHub
Nov 03, 2020
Browse files
Move mode str to the beginning (#634)
parent
2d52809c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
mmcv/runner/hooks/logger/base.py
mmcv/runner/hooks/logger/base.py
+4
-2
mmcv/runner/hooks/logger/pavi.py
mmcv/runner/hooks/logger/pavi.py
+1
-1
No files found.
mmcv/runner/hooks/logger/base.py
View file @
b74aa792
...
@@ -118,6 +118,7 @@ class LoggerHook(Hook):
...
@@ -118,6 +118,7 @@ class LoggerHook(Hook):
runner
,
runner
,
allow_scalar
=
True
,
allow_scalar
=
True
,
allow_text
=
False
,
allow_text
=
False
,
add_mode
=
True
,
tags_to_skip
=
(
'time'
,
'data_time'
)):
tags_to_skip
=
(
'time'
,
'data_time'
)):
tags
=
{}
tags
=
{}
for
var
,
val
in
runner
.
log_buffer
.
output
.
items
():
for
var
,
val
in
runner
.
log_buffer
.
output
.
items
():
...
@@ -127,8 +128,9 @@ class LoggerHook(Hook):
...
@@ -127,8 +128,9 @@ class LoggerHook(Hook):
continue
continue
if
isinstance
(
val
,
str
)
and
not
allow_text
:
if
isinstance
(
val
,
str
)
and
not
allow_text
:
continue
continue
tag
=
f
'
{
var
}
/
{
self
.
get_mode
(
runner
)
}
'
if
add_mode
:
tags
[
tag
]
=
val
var
=
f
'
{
self
.
get_mode
(
runner
)
}
/
{
var
}
'
tags
[
var
]
=
val
tags
.
update
(
self
.
get_lr_tags
(
runner
))
tags
.
update
(
self
.
get_lr_tags
(
runner
))
tags
.
update
(
self
.
get_momentum_tags
(
runner
))
tags
.
update
(
self
.
get_momentum_tags
(
runner
))
return
tags
return
tags
...
...
mmcv/runner/hooks/logger/pavi.py
View file @
b74aa792
...
@@ -71,7 +71,7 @@ class PaviLoggerHook(LoggerHook):
...
@@ -71,7 +71,7 @@ class PaviLoggerHook(LoggerHook):
@
master_only
@
master_only
def
log
(
self
,
runner
):
def
log
(
self
,
runner
):
tags
=
self
.
get_loggable_tags
(
runner
)
tags
=
self
.
get_loggable_tags
(
runner
,
add_mode
=
False
)
if
tags
:
if
tags
:
self
.
writer
.
add_scalars
(
self
.
writer
.
add_scalars
(
self
.
get_mode
(
runner
),
tags
,
self
.
get_step
(
runner
))
self
.
get_mode
(
runner
),
tags
,
self
.
get_step
(
runner
))
...
...
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