Skip to content

Commit 158caf2

Browse files
authored
TST: dask tests are extremely flaky (#263)
Reviewed at #263
1 parent 3efa4b6 commit 158caf2

File tree

4 files changed

+32
-15
lines changed

4 files changed

+32
-15
lines changed

.github/workflows/array-api-tests-dask.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,9 @@ jobs:
1010
package-version: '>= 2024.9.0'
1111
module-name: dask.array
1212
extra-requires: numpy
13-
pytest-extra-args: --disable-deadline --max-examples=5
13+
# Dask is substantially slower then other libraries on unit tests.
14+
# Reduce the number of examples to speed up CI, even though this means that this
15+
# workflow is barely more than a smoke test, and one should expect extreme
16+
# flakiness. Before changes to dask-xfails.txt or dask-skips.txt, please run
17+
# the full test suite with at least 200 examples.
18+
pytest-extra-args: --max-examples=5

.github/workflows/array-api-tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ on:
3333
description: "Multiline string of environment variables to set for the test run."
3434

3535
env:
36-
PYTEST_ARGS: "--max-examples 200 -v -rxXfE --ci ${{ inputs.pytest-extra-args }} --hypothesis-disable-deadline"
36+
PYTEST_ARGS: "--max-examples 200 -v -rxXfE --ci ${{ inputs.pytest-extra-args }} --hypothesis-disable-deadline --durations 10"
3737

3838
jobs:
3939
tests:

dask-skips.txt

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
# slow and not implemented in dask
2-
array_api_tests/test_linalg.py::test_matrix_power
1+
# NOTE: dask tests run on a very small number of examples in CI due to
2+
# slowness. This causes very high flakiness in the tests.
3+
# Before changing this file, please run with at least 200 examples.
34

4-
# hangs on 2024.12
5+
# Passes, but extremely slow
6+
array_api_tests/test_linalg.py::test_outer
7+
8+
# Hangs
59
array_api_tests/test_creation_functions.py::test_eye

dask-xfails.txt

+18-10
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# NOTE: dask tests run on a very small number of examples in CI due to
2+
# slowness. This causes very high flakiness in the tests.
3+
# Before changing this file, please run with at least 200 examples.
4+
5+
# Broken edge case with shape 0
6+
# https://github.com/dask/dask/issues/11800
7+
array_api_tests/test_array_object.py::test_setitem
8+
19
# Various indexing errors
210
array_api_tests/test_array_object.py::test_getitem_masking
311

@@ -11,6 +19,9 @@ array_api_tests/test_data_type_functions.py::test_finfo[float32]
1119
# (I think the test is not forcing the op to be computed?)
1220
array_api_tests/test_creation_functions.py::test_linspace
1321

22+
# Shape mismatch
23+
array_api_tests/test_indexing_functions.py::test_take
24+
1425
# Array methods and attributes not already on da.Array cannot be wrapped
1526
array_api_tests/test_has_names.py::test_has_names[array_method-__array_namespace__]
1627
array_api_tests/test_has_names.py::test_has_names[array_method-to_device]
@@ -31,7 +42,7 @@ array_api_tests/test_set_functions.py::test_unique_values
3142
# fails for ndim > 2
3243
array_api_tests/test_linalg.py::test_svdvals
3344

34-
# dtype mismatch got uint64, but should be uint8, NPY_PROMOTION_STATE=weak doesn't help :(
45+
# dtype mismatch got uint64, but should be uint8; NPY_PROMOTION_STATE=weak doesn't help
3546
array_api_tests/test_linalg.py::test_tensordot
3647

3748
# AssertionError: out.dtype=uint64, but should be uint8 [tensordot(uint8, uint8)]
@@ -89,29 +100,28 @@ array_api_tests/meta/test_hypothesis_helpers.py::test_symmetric_matrices
89100
# https://github.com/dask/dask/issues/11706
90101
array_api_tests/test_creation_functions.py::test_arange
91102

103+
# da.searchsorted with a sorter argument is not supported
104+
array_api_tests/test_searching_functions.py::test_searchsorted
105+
92106
# 2023.12 support
93107
array_api_tests/test_manipulation_functions.py::test_repeat
94108

95109
# 2024.12 support
96-
array_api_tests/test_array_object.py::test_setitem
97110
array_api_tests/test_array_object.py::test_getitem_arrays_and_ints_1[1]
98111
array_api_tests/test_array_object.py::test_getitem_arrays_and_ints_1[None]
99112
array_api_tests/test_array_object.py::test_getitem_arrays_and_ints_2[1]
100113
array_api_tests/test_array_object.py::test_getitem_arrays_and_ints_2[None]
101114
array_api_tests/test_has_names.py::test_has_names[indexing-take_along_axis]
115+
array_api_tests/test_signatures.py::test_func_signature[count_nonzero]
102116
array_api_tests/test_signatures.py::test_func_signature[take_along_axis]
103117

104118
array_api_tests/test_linalg.py::test_cholesky
105119
array_api_tests/test_linalg.py::test_linalg_matmul
120+
array_api_tests/test_linalg.py::test_matmul
106121
array_api_tests/test_linalg.py::test_matrix_norm
107122
array_api_tests/test_linalg.py::test_qr
108-
array_api_tests/test_manipulation_functions.py::test_concat
109123
array_api_tests/test_manipulation_functions.py::test_roll
110-
array_api_tests/test_operators_and_elementwise_functions.py::test_add[add(x1, x2)]
111-
array_api_tests/test_operators_and_elementwise_functions.py::test_bitwise_left_shift[bitwise_left_shift(x1, x2)]
112-
array_api_tests/test_operators_and_elementwise_functions.py::test_bitwise_right_shift[bitwise_right_shift(x1, x2)]
113-
array_api_tests/test_operators_and_elementwise_functions.py::test_greater[__gt__(x1, x2)]
114-
array_api_tests/test_signatures.py::test_func_signature[count_nonzero]
124+
115125
array_api_tests/test_special_cases.py::test_binary[floor_divide(x1_i is +infinity and isfinite(x2_i) and x2_i > 0) -> +infinity]
116126
array_api_tests/test_special_cases.py::test_binary[floor_divide(x1_i is +infinity and isfinite(x2_i) and x2_i < 0) -> -infinity]
117127
array_api_tests/test_special_cases.py::test_binary[floor_divide(x1_i is -infinity and isfinite(x2_i) and x2_i > 0) -> -infinity]
@@ -131,5 +141,3 @@ array_api_tests/test_special_cases.py::test_iop[__ifloordiv__(x1_i is -infinity
131141
array_api_tests/test_special_cases.py::test_iop[__ifloordiv__(isfinite(x1_i) and x1_i > 0 and x2_i is -infinity) -> -0]
132142
array_api_tests/test_special_cases.py::test_iop[__ifloordiv__(isfinite(x1_i) and x1_i < 0 and x2_i is +infinity) -> -0]
133143
array_api_tests/test_special_cases.py::test_nan_propagation[cumulative_prod]
134-
135-

0 commit comments

Comments
 (0)