Remove experimental_json_serialization from tests. (#6640)
This commit is contained in:
@@ -339,7 +339,6 @@ TEST_F(SerializationTest, ConfigurationCount) {
|
||||
auto learner = std::unique_ptr<Learner>(Learner::Create(mat));
|
||||
|
||||
learner->SetParam("tree_method", "gpu_hist");
|
||||
learner->SetParam("enable_experimental_json_serialization", "1");
|
||||
|
||||
for (size_t i = 0; i < 10; ++i) {
|
||||
learner->UpdateOneIter(i, p_dmat);
|
||||
|
||||
@@ -283,9 +283,10 @@ class TestGPUPredict:
|
||||
y = (x0 * 10 - 20) + (x1 - 2)
|
||||
dtrain = xgb.DMatrix(df, label=y, enable_categorical=True)
|
||||
|
||||
params = {'tree_method': 'gpu_hist', 'predictor': 'gpu_predictor',
|
||||
'enable_experimental_json_serialization': True,
|
||||
'max_depth': 3, 'learning_rate': 1.0, 'base_score': 0.0, 'eval_metric': 'rmse'}
|
||||
params = {
|
||||
'tree_method': 'gpu_hist', 'predictor': 'gpu_predictor',
|
||||
'max_depth': 3, 'learning_rate': 1.0, 'base_score': 0.0, 'eval_metric': 'rmse'
|
||||
}
|
||||
|
||||
eval_history = {}
|
||||
bst = xgb.train(params, dtrain, num_boost_round=5, evals=[(dtrain, 'train')],
|
||||
|
||||
@@ -6,15 +6,14 @@ rng = np.random.RandomState(1994)
|
||||
|
||||
|
||||
class TestGPUTrainingContinuation:
|
||||
def run_training_continuation(self, use_json):
|
||||
def test_training_continuation(self):
|
||||
kRows = 64
|
||||
kCols = 32
|
||||
X = np.random.randn(kRows, kCols)
|
||||
y = np.random.randn(kRows)
|
||||
dtrain = xgb.DMatrix(X, y)
|
||||
params = {'tree_method': 'gpu_hist', 'max_depth': '2',
|
||||
'gamma': '0.1', 'alpha': '0.01',
|
||||
'enable_experimental_json_serialization': use_json}
|
||||
'gamma': '0.1', 'alpha': '0.01'}
|
||||
bst_0 = xgb.train(params, dtrain, num_boost_round=64)
|
||||
dump_0 = bst_0.get_dump(dump_format='json')
|
||||
|
||||
@@ -48,9 +47,3 @@ class TestGPUTrainingContinuation:
|
||||
obj_0 = json.loads(dump_0[i])
|
||||
obj_1 = json.loads(dump_1[i])
|
||||
recursive_compare(obj_0, obj_1)
|
||||
|
||||
def test_gpu_training_continuation_binary(self):
|
||||
self.run_training_continuation(False)
|
||||
|
||||
def test_gpu_training_continuation_json(self):
|
||||
self.run_training_continuation(True)
|
||||
|
||||
@@ -63,9 +63,7 @@ class TestGPUUpdaters:
|
||||
by_etl_results = {}
|
||||
by_builtin_results = {}
|
||||
|
||||
parameters = {'tree_method': 'gpu_hist',
|
||||
'predictor': 'gpu_predictor',
|
||||
'enable_experimental_json_serialization': True}
|
||||
parameters = {'tree_method': 'gpu_hist', 'predictor': 'gpu_predictor'}
|
||||
|
||||
m = xgb.DMatrix(onehot, label, enable_categorical=True)
|
||||
xgb.train(parameters, m,
|
||||
|
||||
Reference in New Issue
Block a user