Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MindSpore
mindinsight
提交
d640bf5a
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d640bf5a
编写于
4月 23, 2020
作者:
M
mindspore-ci-bot
提交者:
Gitee
4月 23, 2020
浏览文件
操作
浏览文件
下载
差异文件
!68 add annotation and validation for device_num
Merge pull request !68 from luopengting/lineage_device_num
上级
b476d7d4
009fc84d
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
14 addition
and
0 deletion
+14
-0
mindinsight/lineagemgr/api/model.py
mindinsight/lineagemgr/api/model.py
+2
-0
mindinsight/lineagemgr/common/exceptions/error_code.py
mindinsight/lineagemgr/common/exceptions/error_code.py
+4
-0
mindinsight/lineagemgr/common/validator/model_parameter.py
mindinsight/lineagemgr/common/validator/model_parameter.py
+6
-0
mindinsight/lineagemgr/common/validator/validate.py
mindinsight/lineagemgr/common/validator/validate.py
+2
-0
未找到文件。
mindinsight/lineagemgr/api/model.py
浏览文件 @
d640bf5a
...
...
@@ -142,6 +142,8 @@ def filter_summary_lineage(summary_base_dir, search_condition=None):
- batch_size (dict): The filter condition of batch size.
- device_num (dict): The filter condition of device num.
- loss (dict): The filter condition of loss.
- model_size (dict): The filter condition of model size.
...
...
mindinsight/lineagemgr/common/exceptions/error_code.py
浏览文件 @
d640bf5a
...
...
@@ -81,7 +81,9 @@ class LineageErrors(LineageErrorCodes):
LINEAGE_FILE_NOT_FOUND_ERROR
=
22
|
_MODEL_LINEAGE_API_ERROR_MASK
LINEAGE_PARAM_SUMMARY_PATH_ERROR
=
23
|
_MODEL_LINEAGE_API_ERROR_MASK
LINEAGE_SEARCH_CONDITION_PARAM_ERROR
=
24
|
_MODEL_LINEAGE_API_ERROR_MASK
LINEAGE_PARAM_LINEAGE_TYPE_ERROR
=
25
|
_MODEL_LINEAGE_API_ERROR_MASK
LINEAGE_PARAM_DEVICE_NUM_ERROR
=
26
|
_MODEL_LINEAGE_API_ERROR_MASK
# Dataset lineage error codes.
LINEAGE_PARAM_DATASET_MARK_ERROR
=
0
|
_DATASET_LINEAGE_ERROR_MASK
...
...
@@ -146,6 +148,8 @@ class LineageErrorMsg(Enum):
PARAM_BATCH_SIZE_ERROR
=
"The parameter batch_size is invalid. It should be a non-negative integer."
PARAM_DEVICE_NUM_ERROR
=
"The parameter device_num is invalid. It should be a non-negative integer."
PARAM_CALLBACK_LIST_ERROR
=
"The parameter list_callback is invalid. It should be an instance of "
\
"mindspore.train.callback._ListCallback."
...
...
mindinsight/lineagemgr/common/validator/model_parameter.py
浏览文件 @
d640bf5a
...
...
@@ -123,6 +123,7 @@ class SearchModelConditionParameter(Schema):
learning_rate
=
fields
.
Dict
()
epoch
=
fields
.
Dict
()
batch_size
=
fields
.
Dict
()
device_num
=
fields
.
Dict
()
loss
=
fields
.
Dict
()
model_size
=
fields
.
Dict
()
limit
=
fields
.
Int
(
validate
=
lambda
n
:
0
<
n
<=
100
)
...
...
@@ -228,6 +229,11 @@ class SearchModelConditionParameter(Schema):
"""Check batch size."""
SearchModelConditionParameter
.
check_dict_value_type
(
data
,
int
)
@
validates
(
"device_num"
)
def
check_device_num
(
self
,
data
):
"""Check device num."""
SearchModelConditionParameter
.
check_dict_value_type
(
data
,
int
)
@
validates
(
"model_size"
)
def
check_model_size
(
self
,
data
):
"""Check model size."""
...
...
mindinsight/lineagemgr/common/validator/validate.py
浏览文件 @
d640bf5a
...
...
@@ -57,6 +57,7 @@ SEARCH_MODEL_ERROR_MAPPING = {
'learning_rate'
:
LineageErrors
.
LINEAGE_PARAM_LEARNING_RATE_ERROR
,
'epoch'
:
LineageErrors
.
LINEAGE_PARAM_EPOCH_ERROR
,
'batch_size'
:
LineageErrors
.
LINEAGE_PARAM_BATCH_SIZE_ERROR
,
'device_num'
:
LineageErrors
.
LINEAGE_PARAM_DEVICE_NUM_ERROR
,
'limit'
:
LineageErrors
.
PARAM_VALUE_ERROR
,
'offset'
:
LineageErrors
.
PARAM_VALUE_ERROR
,
'loss'
:
LineageErrors
.
LINEAGE_PARAM_LOSS_ERROR
,
...
...
@@ -92,6 +93,7 @@ SEARCH_MODEL_ERROR_MSG_MAPPING = {
'learning_rate'
:
LineageErrorMsg
.
LINEAGE_LEARNING_RATE_ERROR
.
value
,
'epoch'
:
LineageErrorMsg
.
PARAM_EPOCH_NUM_ERROR
.
value
,
'batch_size'
:
LineageErrorMsg
.
PARAM_BATCH_SIZE_ERROR
.
value
,
'device_num'
:
LineageErrorMsg
.
PARAM_DEVICE_NUM_ERROR
.
value
,
'limit'
:
LineageErrorMsg
.
PARAM_LIMIT_ERROR
.
value
,
'offset'
:
LineageErrorMsg
.
PARAM_OFFSET_ERROR
.
value
,
'loss'
:
LineageErrorMsg
.
LINEAGE_LOSS_ERROR
.
value
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录