Skip to content

Commit

Permalink
remove the duplicate data path (#2432)
Browse files Browse the repository at this point in the history
* fix

* fix the bug
  • Loading branch information
guolinke committed Sep 26, 2019
1 parent fe9f292 commit 2bf9a0f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/io/config.cpp
Expand Up @@ -234,6 +234,19 @@ void Config::Set(const std::unordered_map<std::string, std::string>& params) {
}
CHECK(valid.size() == valid_data_initscores.size());

if (valid_data_initscores.empty()) {
std::vector<std::string> new_valid;
for (size_t i = 0; i < valid.size(); ++i) {
if (valid[i] != data) {
// Only push the non-training data
new_valid.push_back(valid[i]);
} else {
is_provide_training_metric = true;
}
}
valid = new_valid;
}

// check for conflicts
CheckParamConflict();

Expand Down

0 comments on commit 2bf9a0f

Please sign in to comment.