Add period to evaluation monitor. (#6348)

This commit is contained in:
Jiaming Yuan
2020-11-10 07:47:48 +08:00
committed by GitHub
parent d411f98d26
commit 184e2eac7d
8 changed files with 72 additions and 40 deletions

View File

@@ -11,7 +11,7 @@ import sys
from test_gpu_pickling import build_dataset, model_path, load_pickle
sys.path.append("tests/python")
import test_basic as tb
import testing as tm
class TestLoadPickle(unittest.TestCase):
@@ -61,7 +61,7 @@ class TestLoadPickle(unittest.TestCase):
rng = np.random.RandomState(1994)
X = rng.randn(10, 10)
y = rng.randn(10)
with tb.captured_output() as (out, err):
with tm.captured_output() as (out, err):
# Test no thrust exception is thrown
with pytest.raises(xgb.core.XGBoostError):
xgb.train({'tree_method': 'gpu_hist'}, xgb.DMatrix(X, y))

View File

@@ -7,13 +7,12 @@ import os
import sys
import json
import pytest
import xgboost as xgb
from xgboost import XGBClassifier
sys.path.append("tests/python")
import testing as tm
import xgboost as xgb
from xgboost import XGBClassifier
model_path = './model.pkl'