From a55eebec3a29c5a6bed09d19e610a9653fedfb86 Mon Sep 17 00:00:00 2001 From: Cathy Wong Date: Fri, 30 Oct 2020 15:04:18 -0400 Subject: [PATCH] C++ API: More ValidateParams Removal for dataset APIs --- mindspore/ccsrc/minddata/dataset/api/datasets.cc | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/mindspore/ccsrc/minddata/dataset/api/datasets.cc b/mindspore/ccsrc/minddata/dataset/api/datasets.cc index eb0040dc11..2e748cae1c 100644 --- a/mindspore/ccsrc/minddata/dataset/api/datasets.cc +++ b/mindspore/ccsrc/minddata/dataset/api/datasets.cc @@ -540,11 +540,6 @@ std::shared_ptr Dataset::BuildSentencePieceVocab( auto ds = std::make_shared(shared_from_this(), vocab, col_names, vocab_size, character_coverage, model_type, params); - // Validate input params - if (!ds->ValidateParams()) { - return nullptr; - } - // Run tree here to start building vocab std::shared_ptr iter = ds->CreateIterator(); if (iter == nullptr) { @@ -569,10 +564,6 @@ std::shared_ptr Dataset::BuildVocab(const std::vector &colum auto ds = std::make_shared(shared_from_this(), vocab, columns, freq_range, top_k, special_tokens, special_first); - if (!ds->ValidateParams()) { - return nullptr; - } - // Run tree here to starting building vocab std::shared_ptr iter = ds->CreateIterator(); if (iter == nullptr) { @@ -1051,7 +1042,7 @@ std::shared_ptr CreateDatasetCache(session_id_type id, uint64_t me std::optional num_connections, std::optional prefetch_sz) { auto cache = std::make_shared(id, mem_sz, spill, hostname, port, num_connections, prefetch_sz); - return cache->ValidateParams() ? cache : nullptr; + return cache; } #endif