Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MindSpore
mindinsight
提交
30e017e2
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看板
提交
30e017e2
编写于
4月 16, 2020
作者:
K
kouzhenzhong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
lineagemgr: fix pylint warning
上级
15a7ad78
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
9 addition
and
11 deletion
+9
-11
mindinsight/lineagemgr/common/validator/model_parameter.py
mindinsight/lineagemgr/common/validator/model_parameter.py
+1
-1
mindinsight/lineagemgr/common/validator/validate.py
mindinsight/lineagemgr/common/validator/validate.py
+3
-4
mindinsight/lineagemgr/summary/_summary_adapter.py
mindinsight/lineagemgr/summary/_summary_adapter.py
+3
-3
mindinsight/lineagemgr/summary/summary_record.py
mindinsight/lineagemgr/summary/summary_record.py
+1
-1
tests/st/func/lineagemgr/api/test_model_api.py
tests/st/func/lineagemgr/api/test_model_api.py
+1
-2
未找到文件。
mindinsight/lineagemgr/common/validator/model_parameter.py
浏览文件 @
30e017e2
...
...
@@ -226,7 +226,7 @@ class SearchModelConditionParameter(Schema):
if
not
isinstance
(
attr
,
str
):
raise
LineageParamValueError
(
'The search attribute not supported.'
)
if
attr
not
in
FIELD_MAPPING
and
not
attr
.
startswith
((
'metric/'
,
'user_defined/'
)):
if
attr
not
in
FIELD_MAPPING
and
not
attr
.
startswith
((
'metric/'
,
'user_defined/'
)):
raise
LineageParamValueError
(
'The search attribute not supported.'
)
if
not
isinstance
(
condition
,
dict
):
...
...
mindinsight/lineagemgr/common/validator/validate.py
浏览文件 @
30e017e2
...
...
@@ -354,9 +354,8 @@ def validate_condition(search_condition):
log
.
error
(
err_msg
)
raise
LineageParamValueError
(
err_msg
)
if
not
(
sorted_name
in
FIELD_MAPPING
or
(
sorted_name
.
startswith
(
'metric/'
)
and
len
(
sorted_name
)
>
7
)
or
(
sorted_name
.
startswith
(
'user_defined/'
)
and
len
(
sorted_name
)
>
13
)
):
or
(
sorted_name
.
startswith
(
'metric/'
)
and
len
(
sorted_name
)
>
7
)
or
(
sorted_name
.
startswith
(
'user_defined/'
)
and
len
(
sorted_name
)
>
13
)):
log
.
error
(
err_msg
)
raise
LineageParamValueError
(
err_msg
)
...
...
@@ -429,4 +428,4 @@ def validate_user_defined_info(user_defined_info):
all_keys
=
field_map
|
user_defined_keys
if
len
(
field_map
)
+
len
(
user_defined_keys
)
!=
len
(
all_keys
):
raise
LineageParamValueError
(
"There are some keys have defined in lineage."
)
\ No newline at end of file
raise
LineageParamValueError
(
"There are some keys have defined in lineage."
)
mindinsight/lineagemgr/summary/_summary_adapter.py
浏览文件 @
30e017e2
...
...
@@ -15,8 +15,8 @@
"""The converter between proto format event of lineage and dict."""
import
time
from
mindinsight.datavisual.proto_files.mindinsight_lineage_pb2
import
LineageEvent
,
UserDefinedInfo
from
mindinsight.lineagemgr.common.exceptions.exceptions
import
LineageParamTypeError
,
\
from
mindinsight.datavisual.proto_files.mindinsight_lineage_pb2
import
LineageEvent
from
mindinsight.lineagemgr.common.exceptions.exceptions
import
LineageParamTypeError
,
\
LineageParamValueError
from
mindinsight.lineagemgr.common.log
import
logger
as
log
...
...
@@ -345,4 +345,4 @@ def _package_user_defined_info(user_defined_dict, user_defined_message):
try
:
getattr
(
add_user_defined_info
,
attr_name
)[
key
]
=
value
except
ValueError
:
raise
LineageParamValueError
(
"Value is out of range or not be supported yet."
)
\ No newline at end of file
raise
LineageParamValueError
(
"Value is out of range or not be supported yet."
)
mindinsight/lineagemgr/summary/summary_record.py
浏览文件 @
30e017e2
...
...
@@ -179,4 +179,4 @@ class LineageSummary:
"""
self
.
event_writer
.
write_event_to_file
(
package_user_defined_info
(
user_dict
).
SerializeToString
()
)
\ No newline at end of file
)
tests/st/func/lineagemgr/api/test_model_api.py
浏览文件 @
30e017e2
...
...
@@ -30,10 +30,9 @@ from mindinsight.lineagemgr import filter_summary_lineage, get_summary_lineage
from
mindinsight.lineagemgr.common.exceptions.exceptions
import
(
LineageFileNotFoundError
,
LineageParamSummaryPathError
,
LineageParamTypeError
,
LineageParamValueError
,
LineageSearchConditionParamError
)
from
..conftest
import
BASE_SUMMARY_DIR
,
DATASET_GRAPH
,
SUMMARY_DIR
,
SUMMARY_DIR_2
from
.....ut.lineagemgr.querier
import
event_data
from
os
import
environ
LINEAGE_INFO_RUN1
=
{
'summary_dir'
:
os
.
path
.
join
(
BASE_SUMMARY_DIR
,
'run1'
),
'metric'
:
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录