!24296 add warning for none operation

Merge pull request !24296 from jiangshuqiang/fix_none_issue
This commit is contained in:
i-robot 2021-09-28 06:48:22 +00:00 committed by Gitee
commit 5285f34b2d
1 changed files with 4 additions and 0 deletions

View File

@ -100,6 +100,10 @@ class DatasetGraph:
operation (dict): Enhancement operation.
message (Operation): Enhancement operation proto message.
"""
if operation is None:
logger.warning("Summary can not collect the operation for dataset graph as the operation is None, "
"please check the dataset.")
return
for key, value in operation.items():
if isinstance(value, (list, tuple)):
if all(isinstance(ele, int) for ele in value):