提交 f57e0271 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!396 profiler: fixed error message in timeline rest api

Merge pull request !396 from zhangyunshu/zys_timeline_fixed_errmsg
......@@ -430,8 +430,7 @@ def get_timeline_summary():
summary_dir = request.args.get("dir")
profiler_dir = validate_and_normalize_profiler_path(summary_dir, settings.SUMMARY_BASE_DIR)
if not os.path.exists(profiler_dir):
msg = 'The profiler dir is not found!'
raise ProfilerDirNotFoundException(msg=msg)
raise ProfilerDirNotFoundException(msg=summary_dir)
device_id = request.args.get("device_id", default='0')
_ = to_int(device_id, 'device_id')
......@@ -456,8 +455,7 @@ def get_timeline_detail():
summary_dir = request.args.get("dir")
profiler_dir = validate_and_normalize_profiler_path(summary_dir, settings.SUMMARY_BASE_DIR)
if not os.path.exists(profiler_dir):
msg = 'The profiler dir is not found!'
raise ProfilerDirNotFoundException(msg=msg)
raise ProfilerDirNotFoundException(msg=summary_dir)
device_id = request.args.get("device_id", default='0')
_ = to_int(device_id, 'device_id')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册