Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Python environment for distributed unit tests #3806

Merged
merged 1 commit into from
Oct 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/distributed/runtests.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/bash

echo "====== 1. Basic distributed test with Python ======"
PYTHONPATH=../../python-package/ ../../dmlc-core/tracker/dmlc-submit --cluster=local --num-workers=3\
PYTHONPATH=../../python-package/ python ../../dmlc-core/tracker/dmlc-submit --cluster=local --num-workers=3\
python test_basic.py

echo "====== 2. Regression test for issue #3402 ======"
PYTHONPATH=../../python-package/ ../../dmlc-core/tracker/dmlc-submit --cluster=local --num-workers=2 --worker-cores=1\
PYTHONPATH=../../python-package/ python ../../dmlc-core/tracker/dmlc-submit --cluster=local --num-workers=2 --worker-cores=1\
python test_issue3402.py
5 changes: 5 additions & 0 deletions tests/travis/run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,11 @@ fi
if [ ${TASK} == "distributed_test" ]; then
set -e
make all || exit -1
echo "-------------------------------"
source activate python3
python --version
conda install numpy scipy
python -m pip install kubernetes
cd tests/distributed
./runtests.sh
fi
Expand Down
7 changes: 1 addition & 6 deletions tests/travis/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ if [ ${TASK} == "lint" ]; then
fi


if [ ${TASK} == "python_test" ] || [ ${TASK} == "python_lightweight_test" ]; then
# python2
if [ ${TASK} == "python_test" ] || [ ${TASK} == "python_lightweight_test" ] || [ ${TASK} == "distributed_test" ]; then
if [ ${TRAVIS_OS_NAME} == "osx" ]; then
wget -O conda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
else
Expand All @@ -27,7 +26,3 @@ if [ ${TASK} == "python_test" ] || [ ${TASK} == "python_lightweight_test" ]; the
conda create -n python3 python=3.5
conda create -n python2 python=2.7
fi

if [ ${TASK} == "distributed_test" ]; then
pip install --user kubernetes numpy scipy
fi