From 8934202a8cd7eb396e2b3201b75da162d967f88e Mon Sep 17 00:00:00 2001 From: yuximiao Date: Wed, 19 Aug 2020 15:47:17 +0800 Subject: [PATCH] add a warning when profiling dir is exist --- mindspore/profiler/profiling.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mindspore/profiler/profiling.py b/mindspore/profiler/profiling.py index f0716945df7..93971bdf810 100644 --- a/mindspore/profiler/profiling.py +++ b/mindspore/profiler/profiling.py @@ -83,6 +83,9 @@ class Profiler: self._output_path = os.path.join(self._output_path, "profiler") if not os.path.exists(self._output_path): os.makedirs(self._output_path, exist_ok=True) + else: + logger.warning("The target dir already exists. " + "There may be some old profiling data, and they will be rewrote in the end.") if self._device_target and self._device_target == "GPU": from mindspore._c_expression import GPUProfiler