From 4956520cb6e6d1da488615fe4cca947f61e6cae1 Mon Sep 17 00:00:00 2001 From: chenjian Date: Tue, 15 Nov 2022 11:13:17 +0800 Subject: [PATCH] do not crash vdl when logdir is missing (#1149) --- 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