diff --git a/mindspore/dataset/engine/datasets.py b/mindspore/dataset/engine/datasets.py index 68029a53a6d..18148f3646e 100644 --- a/mindspore/dataset/engine/datasets.py +++ b/mindspore/dataset/engine/datasets.py @@ -1258,13 +1258,11 @@ class Dataset: return dataset @check_device_send - def device_que(self, prefetch_size=None, send_epoch_end=True, create_data_info_queue=False): + def device_que(self, send_epoch_end=True, create_data_info_queue=False): """ Return a transferred Dataset that transfers data through a device. Args: - prefetch_size (int, optional): Prefetch number of records ahead of the - user's request (default=None). send_epoch_end (bool, optional): Whether to send end of sequence to device or not (default=True). create_data_info_queue (bool, optional): Whether to create queue which stores types and shapes of data or not(default=False). @@ -2444,7 +2442,6 @@ def _pyfunc_worker_exec(index, qid, *args): return result - # PythonCallable wrapper for multiprocess pyfunc class _PythonCallable: """ diff --git a/mindspore/dataset/engine/validators.py b/mindspore/dataset/engine/validators.py index e1c5a4ce5cd..a14b89d23ed 100644 --- a/mindspore/dataset/engine/validators.py +++ b/mindspore/dataset/engine/validators.py @@ -742,14 +742,9 @@ def check_device_send(method): @wraps(method) def new_method(self, *args, **kwargs): - param, param_dict = parse_user_args(method, *args, **kwargs) - para_list = list(param_dict.keys()) - if "prefetch_size" in para_list: - if param[0] is not None: - check_pos_int32(param[0], "prefetch_size") - type_check(param[1], (bool,), "send_epoch_end") - else: - type_check(param[0], (bool,), "send_epoch_end") + [send_epoch_end, create_data_info_queue], _ = parse_user_args(method, *args, **kwargs) + type_check(send_epoch_end, (bool,), "send_epoch_end") + type_check(create_data_info_queue, (bool,), "create_data_info_queue") return method(self, *args, **kwargs)