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
a68d28c9
Commit
a68d28c9
authored
Oct 29, 2021
by
ly015
Committed by
Wenwei Zhang
Nov 10, 2021
Browse files
close writer in after_run
parent
9071202f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
mmcv/runner/hooks/logger/pavi.py
mmcv/runner/hooks/logger/pavi.py
+4
-4
No files found.
mmcv/runner/hooks/logger/pavi.py
View file @
a68d28c9
...
...
@@ -100,6 +100,10 @@ class PaviLoggerHook(LoggerHook):
snapshot_file_path
=
ckpt_path
,
iteration
=
iteration
)
# flush the buffer and send a task ending signal to Pavi
if
hasattr
(
self
,
'writer'
):
self
.
writer
.
close
()
@
master_only
def
before_epoch
(
self
,
runner
):
if
runner
.
epoch
==
0
and
self
.
add_graph
:
...
...
@@ -112,7 +116,3 @@ class PaviLoggerHook(LoggerHook):
image
=
data
[
self
.
img_key
][
0
:
1
].
to
(
device
)
with
torch
.
no_grad
():
self
.
writer
.
add_graph
(
_model
,
image
)
def
__del__
(
self
):
if
hasattr
(
self
,
'writer'
):
self
.
writer
.
close
()
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