From 4aec1570a0979fb7be81741cf0aebef29f9d96f5 Mon Sep 17 00:00:00 2001 From: chenjian Date: Mon, 5 Dec 2022 15:00:28 +0800 Subject: [PATCH] do not crash vdl when logdir is missing (#1149) (#1171) --- visualdl/component/profiler/profiler_reader.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/visualdl/component/profiler/profiler_reader.py b/visualdl/component/profiler/profiler_reader.py index 5bcbbcf7..79f19543 100644 --- a/visualdl/component/profiler/profiler_reader.py +++ b/visualdl/component/profiler/profiler_reader.py @@ -66,8 +66,9 @@ class ProfilerReader(object): self.run_managers = {} self.profile_result_queue = Queue() self.tempfile = None - self.runs() - Thread(target=self._get_data_from_queue, args=()).start() + if logdir: + self.runs() + Thread(target=self._get_data_from_queue, args=()).start() @property def logdir(self): -- GitLab