Skip dask tests on ARM. (#6267)
Co-authored-by: Hyunsu Cho <chohyu01@cs.washington.edu>
This commit is contained in:
parent
677f676172
commit
2686d32a36
@ -39,7 +39,6 @@ def test_feature_weights_demo():
|
|||||||
|
|
||||||
|
|
||||||
@pytest.mark.skipif(**tm.no_sklearn())
|
@pytest.mark.skipif(**tm.no_sklearn())
|
||||||
@pytest.mark.skipif(**tm.is_arm())
|
|
||||||
def test_sklearn_demo():
|
def test_sklearn_demo():
|
||||||
script = os.path.join(PYTHON_DEMO_DIR, 'sklearn_examples.py')
|
script = os.path.join(PYTHON_DEMO_DIR, 'sklearn_examples.py')
|
||||||
cmd = ['python', script]
|
cmd = ['python', script]
|
||||||
@ -49,7 +48,6 @@ def test_sklearn_demo():
|
|||||||
|
|
||||||
|
|
||||||
@pytest.mark.skipif(**tm.no_sklearn())
|
@pytest.mark.skipif(**tm.no_sklearn())
|
||||||
@pytest.mark.skipif(**tm.is_arm())
|
|
||||||
def test_sklearn_parallel_demo():
|
def test_sklearn_parallel_demo():
|
||||||
script = os.path.join(PYTHON_DEMO_DIR, 'sklearn_parallel.py')
|
script = os.path.join(PYTHON_DEMO_DIR, 'sklearn_parallel.py')
|
||||||
cmd = ['python', script]
|
cmd = ['python', script]
|
||||||
|
|||||||
@ -83,7 +83,6 @@ class TestEarlyStopping(unittest.TestCase):
|
|||||||
|
|
||||||
@pytest.mark.skipif(**tm.no_sklearn())
|
@pytest.mark.skipif(**tm.no_sklearn())
|
||||||
@pytest.mark.skipif(**tm.no_pandas())
|
@pytest.mark.skipif(**tm.no_pandas())
|
||||||
@pytest.mark.skipif(**tm.is_arm())
|
|
||||||
def test_cv_early_stopping_with_multiple_eval_sets_and_metrics(self):
|
def test_cv_early_stopping_with_multiple_eval_sets_and_metrics(self):
|
||||||
from sklearn.datasets import load_breast_cancer
|
from sklearn.datasets import load_breast_cancer
|
||||||
|
|
||||||
|
|||||||
@ -8,13 +8,14 @@ import asyncio
|
|||||||
from sklearn.datasets import make_classification
|
from sklearn.datasets import make_classification
|
||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
from hypothesis import given, strategies, settings, note
|
from hypothesis import given, settings, note
|
||||||
from test_updaters import hist_parameter_strategy, exact_parameter_strategy
|
from test_updaters import hist_parameter_strategy, exact_parameter_strategy
|
||||||
|
|
||||||
if sys.platform.startswith("win"):
|
if sys.platform.startswith("win"):
|
||||||
pytest.skip("Skipping dask tests on Windows", allow_module_level=True)
|
pytest.skip("Skipping dask tests on Windows", allow_module_level=True)
|
||||||
|
if tm.no_dask()['condition']:
|
||||||
|
pytest.skip(msg=tm.no_dask()['reason'], allow_module_level=True)
|
||||||
|
|
||||||
pytestmark = pytest.mark.skipif(**tm.no_dask())
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from distributed import LocalCluster, Client, get_client
|
from distributed import LocalCluster, Client, get_client
|
||||||
@ -636,7 +637,6 @@ class TestWithDask:
|
|||||||
# Make sure that it's decreasing
|
# Make sure that it's decreasing
|
||||||
assert history[-1] < history[0]
|
assert history[-1] < history[0]
|
||||||
|
|
||||||
@pytest.mark.skipif(**tm.is_arm())
|
|
||||||
@given(params=hist_parameter_strategy,
|
@given(params=hist_parameter_strategy,
|
||||||
dataset=tm.dataset_strategy)
|
dataset=tm.dataset_strategy)
|
||||||
@settings(deadline=None)
|
@settings(deadline=None)
|
||||||
@ -644,7 +644,6 @@ class TestWithDask:
|
|||||||
num_rounds = 30
|
num_rounds = 30
|
||||||
self.run_updater_test(client, params, num_rounds, dataset, 'hist')
|
self.run_updater_test(client, params, num_rounds, dataset, 'hist')
|
||||||
|
|
||||||
@pytest.mark.skipif(**tm.is_arm())
|
|
||||||
@given(params=exact_parameter_strategy,
|
@given(params=exact_parameter_strategy,
|
||||||
dataset=tm.dataset_strategy)
|
dataset=tm.dataset_strategy)
|
||||||
@settings(deadline=None)
|
@settings(deadline=None)
|
||||||
|
|||||||
@ -23,10 +23,6 @@ except ImportError:
|
|||||||
memory = Memory('./cachedir', verbose=0)
|
memory = Memory('./cachedir', verbose=0)
|
||||||
|
|
||||||
|
|
||||||
def is_arm():
|
|
||||||
return {'condition': platform.machine().lower().find('arm') != -1,
|
|
||||||
'reason': 'Skipping expensive tests on ARM.'}
|
|
||||||
|
|
||||||
def no_sklearn():
|
def no_sklearn():
|
||||||
return {'condition': not SKLEARN_INSTALLED,
|
return {'condition': not SKLEARN_INSTALLED,
|
||||||
'reason': 'Scikit-Learn is not installed'}
|
'reason': 'Scikit-Learn is not installed'}
|
||||||
|
|||||||
@ -52,7 +52,7 @@ if [ ${TASK} == "python_test" ]; then
|
|||||||
echo "------------------------------"
|
echo "------------------------------"
|
||||||
if [ ${TRAVIS_CPU_ARCH} == "arm64" ]; then
|
if [ ${TRAVIS_CPU_ARCH} == "arm64" ]; then
|
||||||
tests/ci_build/ci_build.sh aarch64 docker \
|
tests/ci_build/ci_build.sh aarch64 docker \
|
||||||
bash -c "source activate aarch64_test && python -m pip install ./python-package/dist/xgboost-*-py3-none-${TAG}.whl && python -m pytest -v -s -rxXs --durations=0 --fulltrace tests/python --cov=python-package/xgboost"
|
bash -c "source activate aarch64_test && python -m pip install ./python-package/dist/xgboost-*-py3-none-${TAG}.whl && python -m pytest -v -s -rxXs --durations=0 --fulltrace tests/python/test_basic.py tests/python/test_basic_models.py tests/python/test_model_compatibility.py --cov=python-package/xgboost"
|
||||||
else
|
else
|
||||||
conda env create -n cpu_test --file=tests/ci_build/conda_env/macos_cpu_test.yml
|
conda env create -n cpu_test --file=tests/ci_build/conda_env/macos_cpu_test.yml
|
||||||
conda activate cpu_test
|
conda activate cpu_test
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user