Skip to content

Commit

Permalink
Remove checks for label when loading dataset from binary file because…
Browse files Browse the repository at this point in the history
… label is ignored in that case (#4737)
  • Loading branch information
StrikerRUS committed Oct 29, 2021
1 parent 798dc1d commit 96ecab6
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/io/dataset_loader.cpp
Expand Up @@ -834,16 +834,6 @@ void DatasetLoader::CheckDataset(const Dataset* dataset, bool is_load_from_binar
Log::Fatal("Parameter max_bin_by_feature cannot be changed when loading from binary file.");
}

int label_idx = -1;
if (Common::AtoiAndCheck(config_.label_column.c_str(), &label_idx)) {
if (dataset->label_idx_ != label_idx) {
Log::Fatal("Dataset was constructed with label index %d. It cannot be changed to %d when loading from binary file.",
dataset->label_idx_, label_idx);
}
} else {
Log::Info("It is recommended to use integer for label index when loading from binary file for sanity check.");
}

if (config_.label_column != "") {
Log::Warning("Parameter label_column works only in case of loading data directly from text file. It will be ignored when loading from binary file.");
}
Expand Down

0 comments on commit 96ecab6

Please sign in to comment.