Use ellpack for prediction only when sparsepage doesn't exist. (#5504)

This commit is contained in:
Jiaming Yuan
2020-04-10 12:15:46 +08:00
committed by GitHub
parent ad826e913f
commit 6671b42dd4
35 changed files with 166 additions and 116 deletions

View File

@@ -156,7 +156,7 @@ class SerializationTest : public ::testing::Test {
protected:
~SerializationTest() override = default;
void SetUp() override {
p_dmat_ = RandomDataGenerator(kRows, kCols, .5f).GenerateDMatix();
p_dmat_ = RandomDataGenerator(kRows, kCols, .5f).GenerateDMatrix();
p_dmat_->Info().labels_.Resize(kRows);
auto &h_labels = p_dmat_->Info().labels_.HostVector();
@@ -352,7 +352,7 @@ TEST_F(SerializationTest, GPUCoordDescent) {
class LogitSerializationTest : public SerializationTest {
protected:
void SetUp() override {
p_dmat_ = RandomDataGenerator(kRows, kCols, .5f).GenerateDMatix();
p_dmat_ = RandomDataGenerator(kRows, kCols, .5f).GenerateDMatrix();
std::shared_ptr<DMatrix> p_dmat{p_dmat_};
p_dmat->Info().labels_.Resize(kRows);
@@ -487,7 +487,7 @@ class MultiClassesSerializationTest : public SerializationTest {
size_t constexpr static kClasses = 4;
void SetUp() override {
p_dmat_ = RandomDataGenerator(kRows, kCols, .5f).GenerateDMatix();
p_dmat_ = RandomDataGenerator(kRows, kCols, .5f).GenerateDMatrix();
std::shared_ptr<DMatrix> p_dmat{p_dmat_};
p_dmat->Info().labels_.Resize(kRows);