提交 a4613b31 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!1264 dataset: check whether input column list exist first in TFRecord file

Merge pull request !1264 from ms_yan/tf_column
...@@ -918,6 +918,9 @@ Status TFReaderOp::CreateSchema(const std::string tf_file, const std::vector<std ...@@ -918,6 +918,9 @@ Status TFReaderOp::CreateSchema(const std::string tf_file, const std::vector<std
[](const auto &it) -> std::string { return it.first; }); [](const auto &it) -> std::string { return it.first; });
for (const auto &curr_col_name : columns) { for (const auto &curr_col_name : columns) {
auto it = feature_map.find(curr_col_name); auto it = feature_map.find(curr_col_name);
if (it == feature_map.end()) {
RETURN_STATUS_UNEXPECTED("Failed to find column " + curr_col_name);
}
std::string column_name = it->first; std::string column_name = it->first;
std::string column_type; std::string column_type;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册