Fix clang-tidy warnings. (#4149)
* Upgrade gtest for clang-tidy. * Use CMake to install GTest instead of mv. * Don't enforce clang-tidy to return 0 due to errors in thrust. * Add a small test for tidy itself. * Reformat.
This commit is contained in:
@@ -13,15 +13,15 @@ namespace xgboost {
|
||||
namespace tree {
|
||||
|
||||
TEST(Updater, Refresh) {
|
||||
int constexpr n_rows = 8, n_cols = 16;
|
||||
int constexpr kNRows = 8, kNCols = 16;
|
||||
|
||||
HostDeviceVector<GradientPair> gpair =
|
||||
{ {0.23f, 0.24f}, {0.23f, 0.24f}, {0.23f, 0.24f}, {0.23f, 0.24f},
|
||||
{0.27f, 0.29f}, {0.27f, 0.29f}, {0.27f, 0.29f}, {0.27f, 0.29f} };
|
||||
auto dmat = CreateDMatrix(n_rows, n_cols, 0.4, 3);
|
||||
auto dmat = CreateDMatrix(kNRows, kNCols, 0.4, 3);
|
||||
std::vector<std::pair<std::string, std::string>> cfg {
|
||||
{"reg_alpha", "0.0"},
|
||||
{"num_feature", std::to_string(n_cols)},
|
||||
{"num_feature", std::to_string(kNCols)},
|
||||
{"reg_lambda", "1"}};
|
||||
|
||||
RegTree tree = RegTree();
|
||||
|
||||
Reference in New Issue
Block a user