Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MindSpore
mindinsight
提交
a589d02c
M
mindinsight
项目概览
MindSpore
/
mindinsight
通知
7
Star
3
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
mindinsight
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
a589d02c
编写于
7月 22, 2020
作者:
M
mindspore-ci-bot
提交者:
Gitee
7月 22, 2020
浏览文件
操作
浏览文件
下载
差异文件
!446 Parse next lineage file when parsing a summary with an Exception
Merge pull request !446 from luopengting/fix_lineage
上级
68b682c9
f92e47b9
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
22 addition
and
18 deletion
+22
-18
mindinsight/lineagemgr/cache_item_updater.py
mindinsight/lineagemgr/cache_item_updater.py
+13
-10
mindinsight/lineagemgr/lineage_parser.py
mindinsight/lineagemgr/lineage_parser.py
+9
-8
未找到文件。
mindinsight/lineagemgr/cache_item_updater.py
浏览文件 @
a589d02c
...
@@ -17,7 +17,7 @@ import os
...
@@ -17,7 +17,7 @@ import os
from
mindinsight.datavisual.data_transform.data_manager
import
BaseCacheItemUpdater
,
CachedTrainJob
from
mindinsight.datavisual.data_transform.data_manager
import
BaseCacheItemUpdater
,
CachedTrainJob
from
mindinsight.lineagemgr.common.log
import
logger
from
mindinsight.lineagemgr.common.log
import
logger
from
mindinsight.lineagemgr.common.exceptions.exceptions
import
MindInsightException
from
mindinsight.lineagemgr.common.exceptions.exceptions
import
LineageFileNotFoundError
from
mindinsight.lineagemgr.common.validator.validate
import
validate_train_id
,
validate_added_info
from
mindinsight.lineagemgr.common.validator.validate
import
validate_train_id
,
validate_added_info
from
mindinsight.lineagemgr.lineage_parser
import
LineageParser
,
LINEAGE
from
mindinsight.lineagemgr.lineage_parser
import
LineageParser
,
LINEAGE
from
mindinsight.utils.exceptions
import
ParamValueError
from
mindinsight.utils.exceptions
import
ParamValueError
...
@@ -59,19 +59,13 @@ class LineageCacheItemUpdater(BaseCacheItemUpdater):
...
@@ -59,19 +59,13 @@ class LineageCacheItemUpdater(BaseCacheItemUpdater):
try
:
try
:
lineage_parser
=
self
.
_lineage_parsing
(
cache_item
)
lineage_parser
=
self
.
_lineage_parsing
(
cache_item
)
except
MindInsightException
as
err
:
except
LineageFileNotFoundError
:
with
cache_item
.
lock_key
(
LINEAGE
):
self
.
_delete_lineage_in_cache
(
cache_item
,
LINEAGE
,
relative_path
)
try
:
cache_item
.
delete
(
key
=
LINEAGE
)
logger
.
info
(
"Parse failed, delete the tran job %s. Detail: %s."
,
relative_path
,
str
(
err
))
except
ParamValueError
:
logger
.
debug
(
"Parse failed, no need to delete the train job %s. "
"Detail: %s."
,
relative_path
,
str
(
err
))
return
return
super_lineage_obj
=
lineage_parser
.
super_lineage_obj
super_lineage_obj
=
lineage_parser
.
super_lineage_obj
if
super_lineage_obj
is
None
:
if
super_lineage_obj
is
None
:
logger
.
debug
(
"There is no lineage to update in tran job %s."
,
relative_path
)
logger
.
debug
(
"There is no lineage to update in tra
i
n job %s."
,
relative_path
)
return
return
cache_item
.
set
(
key
=
LINEAGE
,
value
=
lineage_parser
)
cache_item
.
set
(
key
=
LINEAGE
,
value
=
lineage_parser
)
...
@@ -91,3 +85,12 @@ class LineageCacheItemUpdater(BaseCacheItemUpdater):
...
@@ -91,3 +85,12 @@ class LineageCacheItemUpdater(BaseCacheItemUpdater):
lineage_parser
.
load
()
lineage_parser
.
load
()
return
lineage_parser
return
lineage_parser
def
_delete_lineage_in_cache
(
self
,
cache_item
,
key
,
relative_path
):
with
cache_item
.
lock_key
(
key
):
try
:
cache_item
.
delete
(
key
=
key
)
logger
.
info
(
"Parse failed, delete the tran job %s."
,
relative_path
)
except
ParamValueError
:
logger
.
debug
(
"Parse failed, and it is not in cache, "
"no need to delete the train job %s."
,
relative_path
)
mindinsight/lineagemgr/lineage_parser.py
浏览文件 @
a589d02c
...
@@ -100,7 +100,15 @@ class LineageParser:
...
@@ -100,7 +100,15 @@ class LineageParser:
continue
continue
self
.
_latest_file_size
=
new_size
self
.
_latest_file_size
=
new_size
self
.
_parse_summary_log
()
try
:
self
.
_parse_summary_log
()
except
(
LineageSummaryAnalyzeException
,
LineageEventNotExistException
,
LineageEventFieldNotExistException
)
as
error
:
logger
.
debug
(
"Parse file failed, file_path is %s. Detail: %s."
,
file_path
,
str
(
error
))
except
MindInsightException
as
error
:
logger
.
exception
(
error
)
logger
.
debug
(
"Parse file failed, file_path is %s."
,
file_path
)
def
_init_if_files_deleted
(
self
,
file_list
):
def
_init_if_files_deleted
(
self
,
file_list
):
"""Init variables if files deleted."""
"""Init variables if files deleted."""
...
@@ -189,13 +197,6 @@ class LineageOrganizer:
...
@@ -189,13 +197,6 @@ class LineageOrganizer:
self
.
_super_lineage_objs
.
update
({
abs_summary_dir
:
super_lineage_obj
})
self
.
_super_lineage_objs
.
update
({
abs_summary_dir
:
super_lineage_obj
})
except
LineageFileNotFoundError
:
except
LineageFileNotFoundError
:
no_lineage_count
+=
1
no_lineage_count
+=
1
except
(
LineageSummaryAnalyzeException
,
LineageEventNotExistException
,
LineageEventFieldNotExistException
)
as
error
:
logger
.
warning
(
"Parse file failed under summary_dir %s. Detail: %s."
,
relative_dir
,
str
(
error
))
except
MindInsightException
as
error
:
logger
.
exception
(
error
)
logger
.
warning
(
"Parse file failed under summary_dir %s."
,
relative_dir
)
if
no_lineage_count
==
len
(
relative_dirs
):
if
no_lineage_count
==
len
(
relative_dirs
):
logger
.
info
(
'There is no summary log file under summary_base_dir.'
)
logger
.
info
(
'There is no summary log file under summary_base_dir.'
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录