diff --git a/mindspore/profiler/parser/minddata_pipeline_parser.py b/mindspore/profiler/parser/minddata_pipeline_parser.py index 390a62cdb7..d73bfd7c11 100644 --- a/mindspore/profiler/parser/minddata_pipeline_parser.py +++ b/mindspore/profiler/parser/minddata_pipeline_parser.py @@ -160,6 +160,10 @@ class MinddataPipelineParser: op_id_info_cache = {} for item in op_info: + if not item: + raise ProfilerRawFileException( + 'The content of minddata pipeline raw file is wrong.' + ) op_id_info_cache[item.get('op_id')] = item with open(self._save_path, 'w') as save_file: