From 1abd253ce7deee193433c2d918c7b1519efdcf68 Mon Sep 17 00:00:00 2001 From: anzhengqi Date: Mon, 7 Jun 2021 10:09:48 +0800 Subject: [PATCH] clean part of warning code in dataset --- mindspore/dataset/engine/datasets.py | 6 ++++++ mindspore/dataset/engine/iterators.py | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/mindspore/dataset/engine/datasets.py b/mindspore/dataset/engine/datasets.py index 119be4eb45f..4283febc815 100644 --- a/mindspore/dataset/engine/datasets.py +++ b/mindspore/dataset/engine/datasets.py @@ -2912,9 +2912,15 @@ class _ToDevice: self._to_device.Send() def stop_send(self): + """ + send stop send signal to pipeline, it is used when end of sequence is sent at the epoch end. + """ self._to_device.StopSend() def continue_send(self): + """ + send continue send signal to pipeline, it is used when end of sequence is sent at the epoch end. + """ self._to_device.ContinueSend() def get_data_info(self): diff --git a/mindspore/dataset/engine/iterators.py b/mindspore/dataset/engine/iterators.py index 71d0ad31dd9..fb690d33690 100644 --- a/mindspore/dataset/engine/iterators.py +++ b/mindspore/dataset/engine/iterators.py @@ -67,7 +67,7 @@ class Iterator: self._col_names = None # create a copy of tree and work on it. - self._ori_dataset = dataset + self.__ori_dataset = dataset self.ir_tree, self.dataset = dataset.create_ir_tree() @@ -125,8 +125,8 @@ class Iterator: if not data: if self.__index == 0: logger.warning("No records available.") - if self._ori_dataset.dataset_size is None: - self._ori_dataset.dataset_size = self.__index + if self.__ori_dataset.dataset_size is None: + self.__ori_dataset.dataset_size = self.__index raise StopIteration self.__index += 1 return data