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

Switch pytest-xdist algorithm to worksteal #5792

Merged
merged 7 commits into from
Mar 6, 2024
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
2 changes: 1 addition & 1 deletion ci/run_cuml_dask_pytests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# Support invoking run_cuml_dask_pytests.sh outside the script directory
cd "$(dirname "$(realpath "${BASH_SOURCE[0]}")")"/../python/cuml/tests/dask

pytest --cache-clear "$@" .
python -m pytest --cache-clear "$@" .
2 changes: 1 addition & 1 deletion ci/run_cuml_singlegpu_memleak_pytests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# Support invoking run_cuml_singlegpu_pytests.sh outside the script directory
cd "$(dirname "$(realpath "${BASH_SOURCE[0]}")")"/../python/cuml/tests

pytest --cache-clear --ignore=dask -m "memleak" "$@" .
python -m pytest --cache-clear --ignore=dask -m "memleak" "$@" .
2 changes: 1 addition & 1 deletion ci/run_cuml_singlegpu_pytests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# Support invoking run_cuml_singlegpu_pytests.sh outside the script directory
cd "$(dirname "$(realpath "${BASH_SOURCE[0]}")")"/../python/cuml/tests

pytest --cache-clear --ignore=dask -m "not memleak" "$@" .
python -m pytest --cache-clear --ignore=dask -m "not memleak" "$@" .
9 changes: 5 additions & 4 deletions ci/test_python_singlegpu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,17 @@ EXITCODE=0
trap "EXITCODE=1" ERR
set +e

rapids-logger "pytest cuml single GPU..."
rapids-logger "pytest cuml single GPU"
./ci/run_cuml_singlegpu_pytests.sh \
--numprocesses=8 \
--dist=worksteal \
--junitxml="${RAPIDS_TESTS_DIR}/junit-cuml.xml" \
--cov-config=../../.coveragerc \
--cov=cuml \
--cov-report=xml:"${RAPIDS_COVERAGE_DIR}/cuml-coverage.xml" \
--cov-report=term \
--cov-report=term

rapids-logger "memory leak pytests..."
rapids-logger "memory leak pytests"

./ci/run_cuml_singlegpu_memleak_pytests.sh \
--numprocesses=1 \
Expand All @@ -29,7 +30,7 @@ rapids-logger "memory leak pytests..."
--cov=cuml \
--cov-report=xml:"${RAPIDS_COVERAGE_DIR}/cuml-memleak-coverage.xml" \
--cov-report=term \
-m "memleak" \
-m "memleak"

rapids-logger "Test script exiting with value: $EXITCODE"
exit ${EXITCODE}
23 changes: 22 additions & 1 deletion ci/test_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,30 @@ fi
# echo to expand wildcard before adding `[extra]` requires for pip
python -m pip install $(echo ./dist/cuml*.whl)[test]

EXITCODE=0
trap "EXITCODE=1" ERR
set +e

# Run smoke tests for aarch64 pull requests
if [[ "$(arch)" == "aarch64" && "${RAPIDS_BUILD_TYPE}" == "pull-request" ]]; then
python ci/wheel_smoke_test_cuml.py
else
python -m pytest ./python/cuml/tests -k 'not test_sparse_pca_inputs' -n 4 --ignore=python/cuml/tests/dask && python -m pytest ./python/cuml/tests -k 'test_sparse_pca_inputs' && python -m pytest ./python/cuml/tests/dask
rapids-logger "pytest cuml single GPU"
./ci/run_cuml_singlegpu_pytests.sh \
--numprocesses=8 \
--dist=worksteal \
-k 'not test_sparse_pca_inputs' \
--junitxml="${RAPIDS_TESTS_DIR}/junit-cuml.xml"

# Run test_sparse_pca_inputs separately
./ci/run_cuml_singlegpu_pytests.sh \
-k 'test_sparse_pca_inputs' \
--junitxml="${RAPIDS_TESTS_DIR}/junit-cuml-sparse-pca.xml"

rapids-logger "pytest cuml-dask"
./ci/run_cuml_dask_pytests.sh \
--junitxml="${RAPIDS_TESTS_DIR}/junit-cuml-dask.xml"
fi

rapids-logger "Test script exiting with value: $EXITCODE"
exit ${EXITCODE}
Loading