!49497 [MD] Python Codecheck per 27 Feb 2023
Merge pull request !49497 from davidanugraha/codecheck_27feb23
This commit is contained in:
commit
4da6ed5d59
|
@ -908,25 +908,41 @@ class Profiler:
|
|||
MinddataParser.execute(source_path, self._output_path, store_id)
|
||||
|
||||
# parse minddata pipeline operator and queue
|
||||
pipeline_parser = None
|
||||
try:
|
||||
pipeline_parser = MinddataPipelineParser(self._output_path, store_id, self._output_path)
|
||||
logger.info("Profiling: analyzing the minddata pipeline operator and queue.")
|
||||
pipeline_parser.parse()
|
||||
except ProfilerException as err:
|
||||
logger.warning(err.message)
|
||||
finally:
|
||||
pass
|
||||
|
||||
if pipeline_parser:
|
||||
logger.info("Profiling: analyzing the minddata pipeline operator and queue.")
|
||||
try:
|
||||
pipeline_parser.parse()
|
||||
except ProfilerException as err:
|
||||
logger.warning(err.message)
|
||||
finally:
|
||||
pass
|
||||
|
||||
# Analyze minddata information
|
||||
md_analyzer = None
|
||||
try:
|
||||
md_analyzer = MinddataProfilingAnalyzer(self._output_path, store_id, self._output_path)
|
||||
logger.info("Profiling: analyzing the minddata information.")
|
||||
md_analyzer.analyze()
|
||||
except ProfilerException as err:
|
||||
logger.warning(err.message)
|
||||
finally:
|
||||
pass
|
||||
|
||||
if md_analyzer:
|
||||
logger.info("Profiling: analyzing the minddata information.")
|
||||
try:
|
||||
md_analyzer.analyze()
|
||||
except ProfilerException as err:
|
||||
logger.warning(err.message)
|
||||
finally:
|
||||
pass
|
||||
|
||||
def _ascend_graph_analyse(self):
|
||||
"""Ascend graph mode analyse."""
|
||||
self._ascend_profiler.finalize()
|
||||
|
|
|
@ -396,7 +396,7 @@ class DatasetHelper:
|
|||
|
||||
def _reset(self, step, epoch):
|
||||
"""Reset the dataset to the provided step and epoch."""
|
||||
self.iter._reset(step, epoch) # pylint: disable=W0212
|
||||
self.iter._reset(step, epoch) # pylint: disable=protected-access
|
||||
|
||||
def get_data_info(self):
|
||||
"""
|
||||
|
@ -440,7 +440,7 @@ class _DatasetIter:
|
|||
self.continue_send = dataset.__transfer_dataset__.continue_send
|
||||
self.get_data_info = dataset.__transfer_dataset__.get_data_info
|
||||
if hasattr(dataset.__transfer_dataset__, "_reset"):
|
||||
self._reset = dataset.__transfer_dataset__._reset # pylint: disable=W0212
|
||||
self._reset = dataset.__transfer_dataset__._reset # pylint: disable=protected-access
|
||||
|
||||
def __iter__(self):
|
||||
self.index = 0
|
||||
|
|
Loading…
Reference in New Issue