Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move warning about empty dataset. #5998

Merged
merged 2 commits into from
Aug 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/learner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1119,6 +1119,10 @@ class LearnerImpl : public LearnerIO {
"booster.";
}
}

if (p_fmat->Info().num_row_ == 0) {
LOG(WARNING) << "Empty dataset at worker: " << rabit::GetRank();
}
}

private:
Expand Down
3 changes: 0 additions & 3 deletions src/metric/elementwise_metric.cu
Original file line number Diff line number Diff line change
Expand Up @@ -332,9 +332,6 @@ struct EvalEWiseBase : public Metric {
bst_float Eval(const HostDeviceVector<bst_float>& preds,
const MetaInfo& info,
bool distributed) override {
if (info.labels_.Size() == 0) {
LOG(WARNING) << "label set is empty";
}
CHECK_EQ(preds.Size(), info.labels_.Size())
<< "label and prediction size not match, "
<< "hint: use merror or mlogloss for multi-class classification";
Expand Down
3 changes: 0 additions & 3 deletions src/objective/regression_obj.cu
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ class RegLossObj : public ObjFunction {
const MetaInfo &info,
int iter,
HostDeviceVector<GradientPair>* out_gpair) override {
if (info.labels_.Size() == 0U) {
LOG(WARNING) << "Label set is empty.";
}
CHECK_EQ(preds.Size(), info.labels_.Size())
<< " " << "labels are not correctly provided"
<< "preds.size=" << preds.Size() << ", label.size=" << info.labels_.Size() << ", "
Expand Down