Browse Source

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

Merge pull request !4743 from yuximiao/master
tags/v0.7.0-beta
mindspore-ci-bot Gitee 5 years ago
parent
commit
26adc815f4
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      mindspore/profiler/profiling.py

+ 3
- 0
mindspore/profiler/profiling.py View File

@@ -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