forked from mindspore-Ecosystem/mindspore
!23471 Fix white list error msg synax error
Merge pull request !23471 from xiefangqi/md_white_list_optimization
This commit is contained in:
commit
92287b86d8
|
@ -308,7 +308,7 @@ Status BatchOp::MapColumns(std::pair<std::unique_ptr<TensorQTable>, CBatchInfo>
|
|||
CHECK_FAIL_RETURN_UNEXPECTED(num_rows == out_cols[i].size(),
|
||||
"Invalid data, column: " + out_col_names_[i] +
|
||||
" expects: " + std::to_string(num_rows) +
|
||||
" rows returned from per_batch_map, gets: " + std::to_string(out_cols[i].size()));
|
||||
" rows returned from per_batch_map, got: " + std::to_string(out_cols[i].size()));
|
||||
for (auto &t_row : *out_q_table) {
|
||||
t_row[col_id] = out_cols[i][row_id++];
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ Status RenameOp::ComputeColMap() {
|
|||
if (new_col_name.find(out_columns_[index]) != new_col_name.end()) {
|
||||
std::string err_msg(
|
||||
"Invalid parameter, rename operation does not support rename one column name into another already exist "
|
||||
"column name, existed column name is: " +
|
||||
"column name, existing column name is: " +
|
||||
out_columns_[index] + ".");
|
||||
RETURN_STATUS_UNEXPECTED(err_msg);
|
||||
}
|
||||
|
@ -83,7 +83,7 @@ Status RenameOp::ComputeColMap() {
|
|||
if (new_col_name.find(name) != new_col_name.end()) {
|
||||
std::string err_msg(
|
||||
"Invalid parameter, rename operation does not support rename one column name into another already exist "
|
||||
"column name, existed column name is: " +
|
||||
"column name, existing column name is: " +
|
||||
name + ".");
|
||||
RETURN_STATUS_UNEXPECTED(err_msg);
|
||||
}
|
||||
|
|
|
@ -138,7 +138,7 @@ bool CelebAOp::CheckDatasetTypeValid() {
|
|||
Path folder_path(folder_path_);
|
||||
partition_file_.open((folder_path / "list_eval_partition.txt").ToString());
|
||||
if (!partition_file_.is_open()) {
|
||||
MS_LOG(ERROR) << "Invalid file, fail to open celeba partition file, path="
|
||||
MS_LOG(ERROR) << "Invalid file, fail to open CelebA partition file, path="
|
||||
<< (folder_path / "list_eval_partition.txt").ToString();
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -221,7 +221,7 @@ Status ClueOp::CalculateNumRowsPerShard() {
|
|||
}
|
||||
std::string file_list = ss.str();
|
||||
RETURN_STATUS_UNEXPECTED(
|
||||
"Invalid data, ClueDataset API can't read the data file (interface mismatch or no data found). "
|
||||
"Invalid data, CLUEDataset API can't read the data file (interface mismatch or no data found). "
|
||||
"Check file path:" +
|
||||
file_list);
|
||||
}
|
||||
|
|
|
@ -402,8 +402,8 @@ def test_exceptions_2():
|
|||
|
||||
# test exception where column name is incorrect
|
||||
assert "col:num1 doesn't exist" in test_exceptions_config(4, 2, ["num1"], simple_copy)
|
||||
assert "expects: 2 rows returned from per_batch_map, gets: 4" in test_exceptions_config(4, 2, ["num"], concat_copy)
|
||||
assert "expects: 4 rows returned from per_batch_map, gets: 2" in test_exceptions_config(4, 4, ["num"], shrink_copy)
|
||||
assert "expects: 2 rows returned from per_batch_map, got: 4" in test_exceptions_config(4, 2, ["num"], concat_copy)
|
||||
assert "expects: 4 rows returned from per_batch_map, got: 2" in test_exceptions_config(4, 4, ["num"], shrink_copy)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
Loading…
Reference in New Issue