diff --git a/src/c_api.cpp b/src/c_api.cpp index b214703aab0e..52ee9c2e5901 100644 --- a/src/c_api.cpp +++ b/src/c_api.cpp @@ -2121,6 +2121,9 @@ int LGBM_BoosterCalcNumPredict(BoosterHandle handle, // TODO in future versions of LightGBM, public API named around `FastConfig` should be made named around // `SingleRowPredictor`, because it is specific to single row prediction, and doesn't actually hold only config. +// At the same time, one should consider removing the old non-fast single row public API that stores its Predictor +// in the Booster, because that will enable removing these Predictors from the Booster, and associated initialization +// code. int LGBM_FastConfigFree(FastConfigHandle fastConfig) { API_BEGIN(); delete reinterpret_cast(fastConfig); diff --git a/tests/cpp_tests/test_single_row.cpp b/tests/cpp_tests/test_single_row.cpp index 14dc1aa55488..ade8d9c82a5f 100644 --- a/tests/cpp_tests/test_single_row.cpp +++ b/tests/cpp_tests/test_single_row.cpp @@ -5,17 +5,11 @@ #include #include -#include -#include #include -#include #include #include -using LightGBM::ByteBuffer; -using LightGBM::Dataset; -using LightGBM::Log; using LightGBM::TestUtils; TEST(SingleRow, JustWorks) { @@ -26,10 +20,6 @@ TEST(SingleRow, JustWorks) { result = TestUtils::LoadDatasetFromExamples("binary_classification/binary.train", "max_bin=15", &train_dataset); EXPECT_EQ(0, result) << "LoadDatasetFromExamples train result code: " << result; - DatasetHandle test_dataset; - result = TestUtils::LoadDatasetFromExamples("binary_classification/binary.test", "max_bin=15", &test_dataset); - EXPECT_EQ(0, result) << "LoadDatasetFromExamples test result code: " << result; - BoosterHandle booster_handle; result = LGBM_BoosterCreate(train_dataset, "app=binary metric=auc num_leaves=31 verbose=0", &booster_handle); EXPECT_EQ(0, result) << "LGBM_BoosterCreate result code: " << result; @@ -150,7 +140,4 @@ TEST(SingleRow, JustWorks) { result = LGBM_DatasetFree(train_dataset); EXPECT_EQ(0, result) << "LGBM_DatasetFree result code: " << result; - - result = LGBM_DatasetFree(test_dataset); - EXPECT_EQ(0, result) << "LGBM_DatasetFree result code: " << result; }