Port patches from 1.0.0 branch (#5336)
* Remove f-string, since it's not supported by Python 3.5 (#5330) * Remove f-string, since it's not supported by Python 3.5 * Add Python 3.5 to CI, to ensure compatibility * Remove duplicated matplotlib * Show deprecation notice for Python 3.5 * Fix lint * Fix lint * Fix a unit test that mistook MINOR ver for PATCH ver * Enforce only major version in JSON model schema * Bump version to 1.1.0-SNAPSHOT
This commit is contained in:
committed by
GitHub
parent
8aa8ef1031
commit
7ac7e8778f
@@ -5,31 +5,35 @@ set -x
|
||||
suite=$1
|
||||
|
||||
# Install XGBoost Python package
|
||||
wheel_found=0
|
||||
for file in python-package/dist/*.whl
|
||||
do
|
||||
if [ -e "${file}" ]
|
||||
function install_xgboost {
|
||||
wheel_found=0
|
||||
for file in python-package/dist/*.whl
|
||||
do
|
||||
if [ -e "${file}" ]
|
||||
then
|
||||
pip install --user "${file}"
|
||||
wheel_found=1
|
||||
break # need just one
|
||||
fi
|
||||
done
|
||||
if [ "$wheel_found" -eq 0 ]
|
||||
then
|
||||
pip install --user "${file}"
|
||||
wheel_found=1
|
||||
break # need just one
|
||||
pushd .
|
||||
cd python-package
|
||||
python setup.py install --user
|
||||
popd
|
||||
fi
|
||||
done
|
||||
if [ "$wheel_found" -eq 0 ]
|
||||
then
|
||||
pushd .
|
||||
cd python-package
|
||||
python setup.py install --user
|
||||
popd
|
||||
fi
|
||||
}
|
||||
|
||||
# Run specified test suite
|
||||
case "$suite" in
|
||||
gpu)
|
||||
install_xgboost
|
||||
pytest -v -s --fulltrace -m "not mgpu" tests/python-gpu
|
||||
;;
|
||||
|
||||
mgpu)
|
||||
install_xgboost
|
||||
pytest -v -s --fulltrace -m "mgpu" tests/python-gpu
|
||||
cd tests/distributed
|
||||
./runtests-gpu.sh
|
||||
@@ -39,17 +43,25 @@ case "$suite" in
|
||||
|
||||
cudf)
|
||||
source activate cudf_test
|
||||
install_xgboost
|
||||
pytest -v -s --fulltrace -m "not mgpu" tests/python-gpu/test_from_columnar.py tests/python-gpu/test_from_cupy.py
|
||||
;;
|
||||
|
||||
cpu)
|
||||
install_xgboost
|
||||
pytest -v -s --fulltrace tests/python
|
||||
cd tests/distributed
|
||||
./runtests.sh
|
||||
;;
|
||||
|
||||
cpu-py35)
|
||||
source activate py35
|
||||
install_xgboost
|
||||
pytest -v -s --fulltrace tests/python
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {gpu|mgpu|cudf|cpu}"
|
||||
echo "Usage: $0 {gpu|mgpu|cudf|cpu|cpu-py35}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user