Browse Source

!8754 Fix test team issues for python API

From: @alex-yuyue
Reviewed-by: 
Signed-off-by:
tags/v1.1.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
79e5521ae6
4 changed files with 10 additions and 13 deletions
  1. +1
    -1
      mindspore/ccsrc/minddata/dataset/engine/datasetops/dataset_op.cc
  2. +9
    -5
      mindspore/ccsrc/minddata/dataset/engine/ir/datasetops/dataset_node.cc
  3. +0
    -1
      mindspore/ccsrc/minddata/dataset/engine/ir/datasetops/dataset_node.h
  4. +0
    -6
      mindspore/ccsrc/minddata/dataset/engine/ir/datasetops/sync_wait_node.cc

+ 1
- 1
mindspore/ccsrc/minddata/dataset/engine/datasetops/dataset_op.cc View File

@@ -313,7 +313,7 @@ Status DatasetOp::GetNumClasses(int64_t *num_classes) {
return child_[0]->GetNumClasses(num_classes);
} else {
*num_classes = -1;
RETURN_STATUS_UNEXPECTED("Can't get the number of classes for the current tree.");
return Status::OK();
}
}



+ 9
- 5
mindspore/ccsrc/minddata/dataset/engine/ir/datasetops/dataset_node.cc View File

@@ -173,11 +173,15 @@ Status ValidateDatasetColumnParam(const std::string &dataset_name, const std::st
RETURN_STATUS_SYNTAX_ERROR(err_msg);
}
}
std::set<std::string> columns_set(columns.begin(), columns.end());
if (columns_set.size() != columns.size()) {
std::string err_msg = dataset_name + ":" + column_param + ": Every column name should not be same with others";
MS_LOG(ERROR) << err_msg;
RETURN_STATUS_SYNTAX_ERROR(err_msg);
std::set<std::string> columns_set;
for (auto &column_name : columns) {
auto result = columns_set.insert(column_name);
if (result.second == false) {
std::string err_msg = dataset_name + ":" + column_param +
": Invalid parameter, duplicate column names are not allowed: " + *result.first;
MS_LOG(ERROR) << err_msg;
RETURN_STATUS_SYNTAX_ERROR(err_msg);
}
}
return Status::OK();
}


+ 0
- 1
mindspore/ccsrc/minddata/dataset/engine/ir/datasetops/dataset_node.h View File

@@ -128,7 +128,6 @@ class DatasetNode : public std::enable_shared_from_this<DatasetNode> {

protected:
std::vector<std::shared_ptr<DatasetNode>> children;
std::shared_ptr<DatasetNode> parent;
std::shared_ptr<DatasetCache> cache_;
Status AddCacheOp(std::vector<std::shared_ptr<DatasetOp>> *node_ops);



+ 0
- 6
mindspore/ccsrc/minddata/dataset/engine/ir/datasetops/sync_wait_node.cc View File

@@ -50,12 +50,6 @@ Status SyncWaitNode::ValidateParams() {
RETURN_STATUS_SYNTAX_ERROR(err_msg);
}

if (condition_name_.empty()) {
std::string err_msg = "SyncWaitNode: condition_name must not be empty.";
MS_LOG(ERROR) << err_msg;
RETURN_STATUS_SYNTAX_ERROR(err_msg);
}

return Status::OK();
}



Loading…
Cancel
Save