Fix #3730: scikit-learn 0.20 compatibility fix (#3731)

* Fix #3730: scikit-learn 0.20 compatibility fix

sklearn.cross_validation has been removed from scikit-learn 0.20,
so replace it with sklearn.model_selection

* Display test names for Python tests for clarity
This commit is contained in:
Philip Hyunsu Cho
2018-09-27 15:03:05 -07:00
committed by Philip Cho
parent b1233ef2ae
commit bc35b8e97b
4 changed files with 28 additions and 37 deletions

View File

@@ -48,7 +48,7 @@ if [ ${TASK} == "python_test" ]; then
python --version
conda install numpy scipy pandas matplotlib nose scikit-learn
python -m pip install graphviz pytest pytest-cov codecov
python -m nose tests/python || exit -1
python -m nose -v tests/python || exit -1
py.test tests/python --cov=python-package/xgboost
codecov
source activate python2
@@ -56,7 +56,7 @@ if [ ${TASK} == "python_test" ]; then
python --version
conda install numpy scipy pandas matplotlib nose scikit-learn
python -m pip install graphviz
python -m nose tests/python || exit -1
python -m nose -v tests/python || exit -1
exit 0
fi
@@ -67,7 +67,7 @@ if [ ${TASK} == "python_lightweight_test" ]; then
python --version
conda install numpy scipy nose
python -m pip install graphviz pytest pytest-cov codecov
python -m nose tests/python || exit -1
python -m nose -v tests/python || exit -1
py.test tests/python --cov=python-package/xgboost
codecov
source activate python2
@@ -75,7 +75,7 @@ if [ ${TASK} == "python_lightweight_test" ]; then
python --version
conda install numpy scipy nose
python -m pip install graphviz
python -m nose tests/python || exit -1
python -m nose -v tests/python || exit -1
python -m pip install flake8==3.4.1
flake8 --ignore E501 python-package || exit -1
flake8 --ignore E501 tests/python || exit -1