[PYTHON] Refactor trainnig API to use callback
This commit is contained in:
22
tests/python/testing.py
Normal file
22
tests/python/testing.py
Normal file
@@ -0,0 +1,22 @@
|
||||
# coding: utf-8
|
||||
|
||||
import nose
|
||||
|
||||
from xgboost.compat import SKLEARN_INSTALLED, PANDAS_INSTALLED
|
||||
|
||||
|
||||
def _skip_if_no_sklearn():
|
||||
if not SKLEARN_INSTALLED:
|
||||
raise nose.SkipTest()
|
||||
|
||||
|
||||
def _skip_if_no_pandas():
|
||||
if not PANDAS_INSTALLED:
|
||||
raise nose.SkipTest()
|
||||
|
||||
|
||||
def _skip_if_no_matplotlib():
|
||||
try:
|
||||
import matplotlib.pyplot as _ # noqa
|
||||
except ImportError:
|
||||
raise nose.SkipTest()
|
||||
Reference in New Issue
Block a user