Skip to content
Open
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
90 changes: 45 additions & 45 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,52 +31,52 @@ jobs:
matrix:
os: [ubuntu-latest]
python-version: ["3.9"]
pytest_args: [tests]
pytest_args: [tests/benchmarks/test_array.py]
runtime-version: [upstream, latest, "0.0.4", "0.1.0"]
include:
# Run stability tests on Python 3.8
- pytest_args: tests/stability
python-version: "3.8"
runtime-version: upstream
os: ubuntu-latest
- pytest_args: tests/stability
python-version: "3.8"
runtime-version: latest
os: ubuntu-latest
- pytest_args: tests/stability
python-version: "3.8"
runtime-version: "0.0.4"
os: ubuntu-latest
- pytest_args: tests/stability
python-version: "3.8"
runtime-version: "0.1.0"
os: ubuntu-latest
# Run stability tests on Python 3.10
- pytest_args: tests/stability
python-version: "3.10"
runtime-version: upstream
os: ubuntu-latest
- pytest_args: tests/stability
python-version: "3.10"
runtime-version: latest
os: ubuntu-latest
- pytest_args: tests/stability
python-version: "3.10"
runtime-version: "0.0.4"
os: ubuntu-latest
- pytest_args: tests/stability
python-version: "3.10"
runtime-version: "0.1.0"
os: ubuntu-latest
# Run stability tests on Python Windows and MacOS (latest py39 only)
- pytest_args: tests/stability
python-version: "3.9"
runtime-version: latest
os: windows-latest
- pytest_args: tests/stability
python-version: "3.9"
runtime-version: latest
os: macos-latest
# include:
# # Run stability tests on Python 3.8
# - pytest_args: tests/stability
# python-version: "3.8"
# runtime-version: upstream
# os: ubuntu-latest
# - pytest_args: tests/stability
# python-version: "3.8"
# runtime-version: latest
# os: ubuntu-latest
# - pytest_args: tests/stability
# python-version: "3.8"
# runtime-version: "0.0.4"
# os: ubuntu-latest
# - pytest_args: tests/stability
# python-version: "3.8"
# runtime-version: "0.1.0"
# os: ubuntu-latest
# # Run stability tests on Python 3.10
# - pytest_args: tests/stability
# python-version: "3.10"
# runtime-version: upstream
# os: ubuntu-latest
# - pytest_args: tests/stability
# python-version: "3.10"
# runtime-version: latest
# os: ubuntu-latest
# - pytest_args: tests/stability
# python-version: "3.10"
# runtime-version: "0.0.4"
# os: ubuntu-latest
# - pytest_args: tests/stability
# python-version: "3.10"
# runtime-version: "0.1.0"
# os: ubuntu-latest
# # Run stability tests on Python Windows and MacOS (latest py39 only)
# - pytest_args: tests/stability
# python-version: "3.9"
# runtime-version: latest
# os: windows-latest
# - pytest_args: tests/stability
# python-version: "3.9"
# runtime-version: latest
# os: macos-latest

steps:
- name: Checkout
Expand Down
20 changes: 13 additions & 7 deletions tests/benchmarks/test_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,15 +135,21 @@ def pad_rechunk(arr):
wait(arr_to_devnull(result), small_client, 10 * 60)


def test_double_diff(small_client):
@pytest.mark.parametrize("ds_size_fraction_of_cluster", [1, 2])
def test_double_diff(ds_size_fraction_of_cluster, small_client):
# Variant of https://github.com/dask/distributed/issues/6597
memory = cluster_memory(small_client) # 76.66 GiB

# TODO switch back to chunksizes in the `chunks=` argument everywhere
# when https://github.com/dask/dask/issues/9488 is fixed
cs = int((parse_bytes("20 MiB") / 8) ** (1 / 2))
a = da.random.random(scaled_array_shape(memory, ("x", "x")), chunks=(cs, cs))
b = da.random.random(scaled_array_shape(memory, ("x", "x")), chunks=(cs, cs))
# We speculate this test shows a lot of variability due to high memory pressure
# Here we can assess Dask's behavior under both conditions.
# This will catch issues like https://github.com/dask/dask/issues/9488
memory = cluster_memory(small_client) // ds_size_fraction_of_cluster # 76.66 GiB

a = da.random.random(
scaled_array_shape(memory, ("x", "x")), chunks=("20MiB", "20MiB")
)
b = da.random.random(
scaled_array_shape(memory, ("x", "x")), chunks=("20MiB", "20MiB")
)
print_size_info(memory, memory, a, b)

diff = a[1:, 1:] - b[:-1, :-1]
Expand Down