Revert "Disable JSON full serialization for now. (#6248)" (#6266)

This reverts commit 6d293020fb.
This commit is contained in:
Jiaming Yuan
2020-10-27 03:30:47 +08:00
committed by GitHub
parent d61b628bf5
commit bcfab4d726
4 changed files with 17 additions and 52 deletions

View File

@@ -224,7 +224,6 @@ TEST_F(SerializationTest, Exact) {
{"nthread", "1"},
{"base_score", "3.14195265"},
{"max_depth", "2"},
{"enable_experimental_json_serialization", "1"},
{"tree_method", "exact"}},
fmap_, p_dmat_);
@@ -234,7 +233,6 @@ TEST_F(SerializationTest, Exact) {
{"base_score", "3.14195265"},
{"max_depth", "2"},
{"num_parallel_tree", "4"},
{"enable_experimental_json_serialization", "1"},
{"tree_method", "exact"}},
fmap_, p_dmat_);
@@ -243,7 +241,6 @@ TEST_F(SerializationTest, Exact) {
{"nthread", "1"},
{"base_score", "3.14195265"},
{"max_depth", "2"},
{"enable_experimental_json_serialization", "1"},
{"tree_method", "exact"}},
fmap_, p_dmat_);
}
@@ -253,7 +250,6 @@ TEST_F(SerializationTest, Approx) {
{"seed", "0"},
{"nthread", "1"},
{"max_depth", "2"},
{"enable_experimental_json_serialization", "1"},
{"tree_method", "approx"}},
fmap_, p_dmat_);
@@ -262,7 +258,6 @@ TEST_F(SerializationTest, Approx) {
{"nthread", "1"},
{"max_depth", "2"},
{"num_parallel_tree", "4"},
{"enable_experimental_json_serialization", "1"},
{"tree_method", "approx"}},
fmap_, p_dmat_);
@@ -270,7 +265,6 @@ TEST_F(SerializationTest, Approx) {
{"seed", "0"},
{"nthread", "1"},
{"max_depth", "2"},
{"enable_experimental_json_serialization", "1"},
{"tree_method", "approx"}},
fmap_, p_dmat_);
}
@@ -280,7 +274,6 @@ TEST_F(SerializationTest, Hist) {
{"seed", "0"},
{"nthread", "1"},
{"max_depth", "2"},
{"enable_experimental_json_serialization", "1"},
{"tree_method", "hist"}},
fmap_, p_dmat_);
@@ -289,7 +282,6 @@ TEST_F(SerializationTest, Hist) {
{"nthread", "1"},
{"max_depth", "2"},
{"num_parallel_tree", "4"},
{"enable_experimental_json_serialization", "1"},
{"tree_method", "hist"}},
fmap_, p_dmat_);
@@ -297,7 +289,6 @@ TEST_F(SerializationTest, Hist) {
{"seed", "0"},
{"nthread", "1"},
{"max_depth", "2"},
{"enable_experimental_json_serialization", "1"},
{"tree_method", "hist"}},
fmap_, p_dmat_);
}
@@ -306,7 +297,6 @@ TEST_F(SerializationTest, CPUCoordDescent) {
TestLearnerSerialization({{"booster", "gblinear"},
{"seed", "0"},
{"nthread", "1"},
{"enable_experimental_json_serialization", "1"},
{"updater", "coord_descent"}},
fmap_, p_dmat_);
}
@@ -315,7 +305,6 @@ TEST_F(SerializationTest, CPUCoordDescent) {
TEST_F(SerializationTest, GpuHist) {
TestLearnerSerialization({{"booster", "gbtree"},
{"seed", "0"},
{"enable_experimental_json_serialization", "1"},
{"nthread", "1"},
{"max_depth", "2"},
{"tree_method", "gpu_hist"}},
@@ -323,7 +312,6 @@ TEST_F(SerializationTest, GpuHist) {
TestLearnerSerialization({{"booster", "gbtree"},
{"seed", "0"},
{"enable_experimental_json_serialization", "1"},
{"nthread", "1"},
{"max_depth", "2"},
{"num_parallel_tree", "4"},
@@ -332,7 +320,6 @@ TEST_F(SerializationTest, GpuHist) {
TestLearnerSerialization({{"booster", "dart"},
{"seed", "0"},
{"enable_experimental_json_serialization", "1"},
{"nthread", "1"},
{"max_depth", "2"},
{"tree_method", "gpu_hist"}},
@@ -390,7 +377,6 @@ TEST_F(SerializationTest, GPUCoordDescent) {
TestLearnerSerialization({{"booster", "gblinear"},
{"seed", "0"},
{"nthread", "1"},
{"enable_experimental_json_serialization", "1"},
{"updater", "gpu_coord_descent"}},
fmap_, p_dmat_);
}
@@ -425,7 +411,6 @@ TEST_F(LogitSerializationTest, Exact) {
{"seed", "0"},
{"nthread", "1"},
{"max_depth", "2"},
{"enable_experimental_json_serialization", "1"},
{"tree_method", "exact"}},
fmap_, p_dmat_);
@@ -434,7 +419,6 @@ TEST_F(LogitSerializationTest, Exact) {
{"seed", "0"},
{"nthread", "1"},
{"max_depth", "2"},
{"enable_experimental_json_serialization", "1"},
{"tree_method", "exact"}},
fmap_, p_dmat_);
}
@@ -445,7 +429,6 @@ TEST_F(LogitSerializationTest, Approx) {
{"seed", "0"},
{"nthread", "1"},
{"max_depth", "2"},
{"enable_experimental_json_serialization", "1"},
{"tree_method", "approx"}},
fmap_, p_dmat_);
@@ -454,7 +437,6 @@ TEST_F(LogitSerializationTest, Approx) {
{"seed", "0"},
{"nthread", "1"},
{"max_depth", "2"},
{"enable_experimental_json_serialization", "1"},
{"tree_method", "approx"}},
fmap_, p_dmat_);
}
@@ -465,7 +447,6 @@ TEST_F(LogitSerializationTest, Hist) {
{"seed", "0"},
{"nthread", "1"},
{"max_depth", "2"},
{"enable_experimental_json_serialization", "1"},
{"tree_method", "hist"}},
fmap_, p_dmat_);
@@ -474,7 +455,6 @@ TEST_F(LogitSerializationTest, Hist) {
{"seed", "0"},
{"nthread", "1"},
{"max_depth", "2"},
{"enable_experimental_json_serialization", "1"},
{"tree_method", "hist"}},
fmap_, p_dmat_);
}
@@ -483,7 +463,6 @@ TEST_F(LogitSerializationTest, CPUCoordDescent) {
TestLearnerSerialization({{"booster", "gblinear"},
{"seed", "0"},
{"nthread", "1"},
{"enable_experimental_json_serialization", "1"},
{"updater", "coord_descent"}},
fmap_, p_dmat_);
}
@@ -495,14 +474,12 @@ TEST_F(LogitSerializationTest, GpuHist) {
{"seed", "0"},
{"nthread", "1"},
{"max_depth", "2"},
{"enable_experimental_json_serialization", "1"},
{"tree_method", "gpu_hist"}},
fmap_, p_dmat_);
TestLearnerSerialization({{"booster", "gbtree"},
{"objective", "binary:logistic"},
{"seed", "0"},
{"enable_experimental_json_serialization", "1"},
{"nthread", "1"},
{"max_depth", "2"},
{"num_parallel_tree", "4"},
@@ -514,7 +491,6 @@ TEST_F(LogitSerializationTest, GpuHist) {
{"seed", "0"},
{"nthread", "1"},
{"max_depth", "2"},
{"enable_experimental_json_serialization", "1"},
{"tree_method", "gpu_hist"}},
fmap_, p_dmat_);
}
@@ -524,7 +500,6 @@ TEST_F(LogitSerializationTest, GPUCoordDescent) {
{"objective", "binary:logistic"},
{"seed", "0"},
{"nthread", "1"},
{"enable_experimental_json_serialization", "1"},
{"updater", "gpu_coord_descent"}},
fmap_, p_dmat_);
}
@@ -560,7 +535,6 @@ TEST_F(MultiClassesSerializationTest, Exact) {
{"seed", "0"},
{"nthread", "1"},
{"max_depth", std::to_string(kClasses)},
{"enable_experimental_json_serialization", "1"},
{"tree_method", "exact"}},
fmap_, p_dmat_);
@@ -570,7 +544,6 @@ TEST_F(MultiClassesSerializationTest, Exact) {
{"nthread", "1"},
{"max_depth", std::to_string(kClasses)},
{"num_parallel_tree", "4"},
{"enable_experimental_json_serialization", "1"},
{"tree_method", "exact"}},
fmap_, p_dmat_);
@@ -579,7 +552,6 @@ TEST_F(MultiClassesSerializationTest, Exact) {
{"seed", "0"},
{"nthread", "1"},
{"max_depth", std::to_string(kClasses)},
{"enable_experimental_json_serialization", "1"},
{"tree_method", "exact"}},
fmap_, p_dmat_);
}
@@ -590,7 +562,6 @@ TEST_F(MultiClassesSerializationTest, Approx) {
{"seed", "0"},
{"nthread", "1"},
{"max_depth", std::to_string(kClasses)},
{"enable_experimental_json_serialization", "1"},
{"tree_method", "approx"}},
fmap_, p_dmat_);
@@ -599,7 +570,6 @@ TEST_F(MultiClassesSerializationTest, Approx) {
{"seed", "0"},
{"nthread", "1"},
{"max_depth", std::to_string(kClasses)},
{"enable_experimental_json_serialization", "1"},
{"tree_method", "approx"}},
fmap_, p_dmat_);
}
@@ -610,7 +580,6 @@ TEST_F(MultiClassesSerializationTest, Hist) {
{"seed", "0"},
{"nthread", "1"},
{"max_depth", std::to_string(kClasses)},
{"enable_experimental_json_serialization", "1"},
{"tree_method", "hist"}},
fmap_, p_dmat_);
@@ -619,7 +588,6 @@ TEST_F(MultiClassesSerializationTest, Hist) {
{"seed", "0"},
{"nthread", "1"},
{"max_depth", std::to_string(kClasses)},
{"enable_experimental_json_serialization", "1"},
{"num_parallel_tree", "4"},
{"tree_method", "hist"}},
fmap_, p_dmat_);
@@ -629,7 +597,6 @@ TEST_F(MultiClassesSerializationTest, Hist) {
{"seed", "0"},
{"nthread", "1"},
{"max_depth", std::to_string(kClasses)},
{"enable_experimental_json_serialization", "1"},
{"tree_method", "hist"}},
fmap_, p_dmat_);
}
@@ -638,7 +605,6 @@ TEST_F(MultiClassesSerializationTest, CPUCoordDescent) {
TestLearnerSerialization({{"booster", "gblinear"},
{"seed", "0"},
{"nthread", "1"},
{"enable_experimental_json_serialization", "1"},
{"updater", "coord_descent"}},
fmap_, p_dmat_);
}
@@ -654,7 +620,6 @@ TEST_F(MultiClassesSerializationTest, GpuHist) {
// different result (1e-7) with CPU predictor for some
// entries.
{"predictor", "gpu_predictor"},
{"enable_experimental_json_serialization", "1"},
{"tree_method", "gpu_hist"}},
fmap_, p_dmat_);
@@ -666,7 +631,6 @@ TEST_F(MultiClassesSerializationTest, GpuHist) {
// GPU_Hist has higher floating point error. 1e-6 doesn't work
// after num_parallel_tree goes to 4
{"num_parallel_tree", "3"},
{"enable_experimental_json_serialization", "1"},
{"tree_method", "gpu_hist"}},
fmap_, p_dmat_);
@@ -675,7 +639,6 @@ TEST_F(MultiClassesSerializationTest, GpuHist) {
{"seed", "0"},
{"nthread", "1"},
{"max_depth", std::to_string(kClasses)},
{"enable_experimental_json_serialization", "1"},
{"tree_method", "gpu_hist"}},
fmap_, p_dmat_);
}
@@ -685,7 +648,6 @@ TEST_F(MultiClassesSerializationTest, GPUCoordDescent) {
{"num_class", std::to_string(kClasses)},
{"seed", "0"},
{"nthread", "1"},
{"enable_experimental_json_serialization", "1"},
{"updater", "gpu_coord_descent"}},
fmap_, p_dmat_);
}