Skip to content

Commit

Permalink
improved error.
Browse files Browse the repository at this point in the history
  • Loading branch information
trivialfis committed Aug 21, 2023
1 parent 246dbc3 commit be7dd73
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/gbm/gblinear.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Copyright 2014-2022 by XGBoost Contributors
/**
* Copyright 2014-2023, XGBoost Contributors
* \file gblinear.cc
* \brief Implementation of Linear booster, with L1/L2 regularization: Elastic Net
* the update rule is parallel coordinate descent (shotgun)
Expand All @@ -26,6 +26,7 @@
#include "../common/timer.h"
#include "../common/common.h"
#include "../common/threading_utils.h"
#include "../common/error_msg.h"

namespace xgboost {
namespace gbm {
Expand Down Expand Up @@ -84,7 +85,8 @@ class GBLinear : public GradientBooster {
param_.UpdateAllowUnknown(cfg);
param_.CheckGPUSupport();
if (param_.updater == "gpu_coord_descent") {
LOG(WARNING) << "`gpu_coord_descent` is deprecated, use `device=cuda` instead.";
LOG(WARNING) << error::DeprecatedFunc("gpu_coord_descent", "2.0.0",
R"(device="cuda", updater="coord_descent")");
}

if (param_.updater == "coord_descent" && ctx_->IsCUDA()) {
Expand Down Expand Up @@ -362,5 +364,4 @@ XGBOOST_REGISTER_GBM(GBLinear, "gblinear")
.set_body([](LearnerModelParam const* booster_config, Context const* ctx) {
return new GBLinear(booster_config, ctx);
});
} // namespace gbm
} // namespace xgboost
} // namespace xgboost::gbm

0 comments on commit be7dd73

Please sign in to comment.