Move warning about empty dataset. (#5998)
This commit is contained in:
parent
f93f1c03fc
commit
6f7112a848
@ -1119,6 +1119,10 @@ class LearnerImpl : public LearnerIO {
|
|||||||
"booster.";
|
"booster.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (p_fmat->Info().num_row_ == 0) {
|
||||||
|
LOG(WARNING) << "Empty dataset at worker: " << rabit::GetRank();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@ -332,9 +332,6 @@ struct EvalEWiseBase : public Metric {
|
|||||||
bst_float Eval(const HostDeviceVector<bst_float>& preds,
|
bst_float Eval(const HostDeviceVector<bst_float>& preds,
|
||||||
const MetaInfo& info,
|
const MetaInfo& info,
|
||||||
bool distributed) override {
|
bool distributed) override {
|
||||||
if (info.labels_.Size() == 0) {
|
|
||||||
LOG(WARNING) << "label set is empty";
|
|
||||||
}
|
|
||||||
CHECK_EQ(preds.Size(), info.labels_.Size())
|
CHECK_EQ(preds.Size(), info.labels_.Size())
|
||||||
<< "label and prediction size not match, "
|
<< "label and prediction size not match, "
|
||||||
<< "hint: use merror or mlogloss for multi-class classification";
|
<< "hint: use merror or mlogloss for multi-class classification";
|
||||||
|
|||||||
@ -55,9 +55,6 @@ class RegLossObj : public ObjFunction {
|
|||||||
const MetaInfo &info,
|
const MetaInfo &info,
|
||||||
int iter,
|
int iter,
|
||||||
HostDeviceVector<GradientPair>* out_gpair) override {
|
HostDeviceVector<GradientPair>* out_gpair) override {
|
||||||
if (info.labels_.Size() == 0U) {
|
|
||||||
LOG(WARNING) << "Label set is empty.";
|
|
||||||
}
|
|
||||||
CHECK_EQ(preds.Size(), info.labels_.Size())
|
CHECK_EQ(preds.Size(), info.labels_.Size())
|
||||||
<< " " << "labels are not correctly provided"
|
<< " " << "labels are not correctly provided"
|
||||||
<< "preds.size=" << preds.Size() << ", label.size=" << info.labels_.Size() << ", "
|
<< "preds.size=" << preds.Size() << ", label.size=" << info.labels_.Size() << ", "
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user