!17871 clean part of warning code in dataset.

From: @anzhengqi
Reviewed-by: @liucunwei,@jonyguo
Signed-off-by: @liucunwei
This commit is contained in:
mindspore-ci-bot 2021-06-08 14:45:01 +08:00 committed by Gitee
commit cd3c5c9e47
2 changed files with 9 additions and 3 deletions

View File

@ -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):

View File

@ -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