Skip to content

Commit

Permalink
Change debug logging location so that we can print the data file name…
Browse files Browse the repository at this point in the history
… as well.
  • Loading branch information
ashok-ponnuswami-msft committed Mar 15, 2021
1 parent af48add commit 3981b34
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/io/dataset_loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,11 @@ Dataset* DatasetLoader::LoadFromFile(const char* filename, int rank, int num_mac
}
// check meta data
dataset->metadata_.CheckOrPartition(num_global_data, used_data_indices);
data_size_t num_queries = dataset->metadata_.num_queries();
if (num_queries > 0) {
Log::Debug("Number of queries in %s: %i. Average number of rows per query: %f.",
filename, static_cast<int>(num_queries), static_cast<double>(dataset->num_data_) / num_queries);
}
// need to check training data
CheckDataset(dataset.get(), is_load_from_binary);

Expand Down
2 changes: 0 additions & 2 deletions src/io/metadata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,6 @@ void Metadata::CheckOrPartition(data_size_t num_all_data, const std::vector<data
for (size_t i = 0; i < tmp_buffer.size(); ++i) {
query_boundaries_[i + 1] = query_boundaries_[i] + tmp_buffer[i];
}
Log::Info("Number of queries: %i. Average number of rows per query: %f.",
static_cast<int>(num_queries_), static_cast<double>(num_data_) / num_queries_);
LoadQueryWeights();
queries_.clear();
}
Expand Down

0 comments on commit 3981b34

Please sign in to comment.