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 720fdd3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 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,9 +26,9 @@
#include "../common/timer.h"
#include "../common/common.h"
#include "../common/threading_utils.h"
#include "../common/error_msg.h"

namespace xgboost {
namespace gbm {
namespace xgboost::gbm {

DMLC_REGISTRY_FILE_TAG(gblinear);

Expand Down Expand Up @@ -84,7 +84,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 +363,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 720fdd3

Please sign in to comment.