Group aware GPU sketching. (#5551)
* Group aware GPU weighted sketching. * Distribute group weights to each data point. * Relax the test. * Validate input meta info. * Fix metainfo copy ctor.
This commit is contained in:
@@ -141,3 +141,17 @@ TEST(MetaInfo, LoadQid) {
|
||||
CHECK(batch.data.HostVector() == expected_data);
|
||||
}
|
||||
}
|
||||
|
||||
TEST(MetaInfo, Validate) {
|
||||
xgboost::MetaInfo info;
|
||||
info.num_row_ = 10;
|
||||
info.num_nonzero_ = 12;
|
||||
info.num_col_ = 3;
|
||||
std::vector<xgboost::bst_group_t> groups (11);
|
||||
info.SetInfo("group", groups.data(), xgboost::DataType::kUInt32, 11);
|
||||
EXPECT_THROW(info.Validate(), dmlc::Error);
|
||||
|
||||
std::vector<float> labels(info.num_row_ + 1);
|
||||
info.SetInfo("label", labels.data(), xgboost::DataType::kFloat32, info.num_row_ + 1);
|
||||
EXPECT_THROW(info.Validate(), dmlc::Error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user