!4743 Add a warning when the output path already exists.

Merge pull request !4743 from yuximiao/master
pull/4743/MERGE
mindspore-ci-bot 5 years ago committed by Gitee
commit 26adc815f4

@ -86,6 +86,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

Loading…
Cancel
Save