Automatically remove nan from input data when it is sparse. (#2062)
* [DATALoad] Automatically remove Nan when load from sparse matrix * add log
This commit is contained in:
@@ -670,9 +670,8 @@ class ColMaker: public TreeUpdater {
|
||||
#pragma omp parallel for schedule(static)
|
||||
for (bst_omp_uint i = 0; i < ndata; ++i) {
|
||||
const bst_uint ridx = rowset[i];
|
||||
if (ridx >= position.size()) {
|
||||
LOG(INFO) << "ridx exceed bound\n";
|
||||
}
|
||||
CHECK_LT(ridx, position.size())
|
||||
<< "ridx exceed bound " << "ridx="<< ridx << " pos=" << position.size();
|
||||
const int nid = this->DecodePosition(ridx);
|
||||
if (tree[nid].is_leaf()) {
|
||||
// mark finish when it is not a fresh leaf
|
||||
|
||||
@@ -298,8 +298,15 @@ class CQHistMaker: public HistMaker<TStats> {
|
||||
hist.data[istart].Add(gstats);
|
||||
} else {
|
||||
while (istart < hist.size && !(fv < hist.cut[istart])) ++istart;
|
||||
CHECK_NE(istart, hist.size);
|
||||
hist.data[istart].Add(gstats);
|
||||
if (istart != hist.size) {
|
||||
hist.data[istart].Add(gstats);
|
||||
} else {
|
||||
LOG(INFO) << "fv=" << fv << ", hist.size=" << hist.size;
|
||||
for (size_t i = 0; i < hist.size; ++i) {
|
||||
LOG(INFO) << "hist[" << i << "]=" << hist.cut[i];
|
||||
}
|
||||
LOG(FATAL) << "fv=" << fv << ", hist.last=" << hist.cut[hist.size - 1];
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user