xgboost/tests/ci_build/test_python.sh
Jiaming Yuan 7663de956c
Run training with empty DMatrix. (#4990)
This makes GPU Hist robust in distributed environment as some workers might not
be associated with any data in either training or evaluation.

* Disable rabit mock test for now: See #5012 .

* Disable dask-cudf test at prediction for now: See #5003

* Launch dask job for all workers despite they might not have any data.
* Check 0 rows in elementwise evaluation metrics.

   Using AUC and AUC-PR still throws an error.  See #4663 for a robust fix.

* Add tests for edge cases.
* Add `LaunchKernel` wrapper handling zero sized grid.
* Move some parts of allreducer into a cu file.
* Don't validate feature names when the booster is empty.

* Sync number of columns in DMatrix.

  As num_feature is required to be the same across all workers in data split
  mode.

* Filtering in dask interface now by default syncs all booster that's not
empty, instead of using rank 0.

* Fix Jenkins' GPU tests.

* Install dask-cuda from source in Jenkins' test.

  Now all tests are actually running.

* Restore GPU Hist tree synchronization test.

* Check UUID of running devices.

  The check is only performed on CUDA version >= 10.x, as 9.x doesn't have UUID field.

* Fix CMake policy and project variables.

  Use xgboost_SOURCE_DIR uniformly, add policy for CMake >= 3.13.

* Fix copying data to CPU

* Fix race condition in cpu predictor.

* Fix duplicated DMatrix construction.

* Don't download extra nccl in CI script.
2019-11-06 16:13:13 +08:00

56 lines
1003 B
Bash
Executable File

#!/bin/bash
set -e
set -x
suite=$1
# Install XGBoost Python package
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
pushd .
cd python-package
python setup.py install --user
popd
fi
# Run specified test suite
case "$suite" in
gpu)
pytest -v -s --fulltrace -m "(not slow) and (not mgpu)" tests/python-gpu
;;
mgpu)
pytest -v -s --fulltrace -m "(not slow) and mgpu" tests/python-gpu
cd tests/distributed
./runtests-gpu.sh
cd -
pytest -v -s --fulltrace -m "mgpu" tests/python-gpu/test_gpu_with_dask.py
;;
cudf)
source activate cudf_test
pytest -v -s --fulltrace -m "not mgpu" tests/python-gpu/test_from_columnar.py
;;
cpu)
pytest -v -s --fulltrace tests/python
cd tests/distributed
./runtests.sh
;;
*)
echo "Usage: $0 {gpu|mgpu|cudf|cpu}"
exit 1
;;
esac