From 78cd9806b6a4992f3ca3f88c3c905c49275880ca Mon Sep 17 00:00:00 2001 From: liu-yongqi-63 Date: Mon, 7 Nov 2022 16:12:16 +0800 Subject: [PATCH] Delete the last remaining set_dynamic_columns interface part --- .../mindspore/dataset/engine/datasets.py | 20 ------------------- tests/dataset_mock.py | 1 - 2 files changed, 21 deletions(-) diff --git a/mindspore/python/mindspore/dataset/engine/datasets.py b/mindspore/python/mindspore/dataset/engine/datasets.py index 200f6d75238..8d365e06477 100644 --- a/mindspore/python/mindspore/dataset/engine/datasets.py +++ b/mindspore/python/mindspore/dataset/engine/datasets.py @@ -334,9 +334,6 @@ class Dataset: self.saved_output_shapes = None self.estimated_output_shapes = None self.runtime_context = None - self.dynamic_setting = [False, None] - self.saved_min_shapes = None - self.saved_max_shapes = None self._col_names = None self.dataset_size = None self._batch_size = None @@ -1644,23 +1641,6 @@ class Dataset: return self.dataset_size - @staticmethod - def __check_dynamic_column_name(dynamic_columns, dataset_columns): - for column in dynamic_columns: - if column not in dataset_columns: - raise RuntimeError("dynamic column [" + column + "] does not match any column in dataset: " + - str(dataset_columns)) - - @staticmethod - def __check_dynamic_column_shape(data, col, dynamic_columns): - shape_mismatch = "dynamic column [" + col + "] with shape " + str(dynamic_columns[col]) + \ - " does not match dataset column [" + col + "] with shape " + str(list(data[col].shape)) - if data[col].ndim != len(dynamic_columns[col]): - raise RuntimeError(shape_mismatch) - for dim in range(len(dynamic_columns[col])): - if dynamic_columns[col][dim] is not None and dynamic_columns[col][dim] != data[col].shape[dim]: - raise RuntimeError(shape_mismatch) - def num_classes(self): """ Get the number of classes in a dataset. diff --git a/tests/dataset_mock.py b/tests/dataset_mock.py index ecdf49d06a5..ac53f96f168 100644 --- a/tests/dataset_mock.py +++ b/tests/dataset_mock.py @@ -30,7 +30,6 @@ class MindData: self._output_shapes = output_shapes self._input_indexs = input_indexs self._iter_num = 0 - self.dynamic_setting = [False, None] def get_dataset_size(self): return self._size