diff --git a/python-package/xgboost/sklearn.py b/python-package/xgboost/sklearn.py index 810574b88..7216f68f8 100644 --- a/python-package/xgboost/sklearn.py +++ b/python-package/xgboost/sklearn.py @@ -13,8 +13,6 @@ from .training import train from .compat import (SKLEARN_INSTALLED, XGBModelBase, XGBClassifierBase, XGBRegressorBase, XGBLabelEncoder) -warnings.simplefilter('always', DeprecationWarning) - def _objective_decorator(func): """Decorate an objective function diff --git a/tests/python/test_with_sklearn.py b/tests/python/test_with_sklearn.py index 8d61217bb..27c51010f 100644 --- a/tests/python/test_with_sklearn.py +++ b/tests/python/test_with_sklearn.py @@ -2,7 +2,6 @@ import numpy as np import random import xgboost as xgb import testing as tm -import warnings from nose.tools import raises rng = np.random.RandomState(1994) @@ -340,14 +339,6 @@ def test_sklearn_random_state(): assert clf.get_xgb_params()['seed'] == 401 -def test_seed_deprecation(): - tm._skip_if_no_sklearn() - warnings.simplefilter("always") - with warnings.catch_warnings(record=True) as w: - xgb.XGBClassifier(seed=1).get_xgb_params() - assert w[0].category == DeprecationWarning - - def test_sklearn_n_jobs(): tm._skip_if_no_sklearn() @@ -358,14 +349,6 @@ def test_sklearn_n_jobs(): assert clf.get_xgb_params()['nthread'] == 2 -def test_nthread_deprecation(): - tm._skip_if_no_sklearn() - warnings.simplefilter("always") - with warnings.catch_warnings(record=True) as w: - xgb.XGBClassifier(nthread=1).get_xgb_params() - assert w[0].category == DeprecationWarning - - def test_kwargs(): tm._skip_if_no_sklearn()