Rename and extract Context. (#8528)

* Rename `GenericParameter` to `Context`.
* Rename header file to reflect the change.
* Rename all references.
This commit is contained in:
Jiaming Yuan
2022-12-07 04:58:54 +08:00
committed by GitHub
parent 05fc6f3ca9
commit 3e26107a9c
105 changed files with 548 additions and 574 deletions

View File

@@ -1,13 +1,13 @@
// Copyright by Contributors
#include <gtest/gtest.h>
#include <xgboost/context.h>
#include <xgboost/objective.h>
#include <xgboost/generic_parameters.h>
#include "../helpers.h"
TEST(Objective, UnknownFunction) {
xgboost::ObjFunction* obj = nullptr;
xgboost::GenericParameter tparam;
xgboost::Context tparam;
std::vector<std::pair<std::string, std::string>> args;
tparam.UpdateAllowUnknown(args);
@@ -21,7 +21,7 @@ TEST(Objective, UnknownFunction) {
namespace xgboost {
TEST(Objective, PredTransform) {
// Test that show PredTransform uses the same device with predictor.
xgboost::GenericParameter tparam;
xgboost::Context tparam;
tparam.UpdateAllowUnknown(Args{{"gpu_id", "0"}});
size_t n = 100;