Skip to content

Commit f4dbd66

Browse files
committed
Fix #1308: Remove dead dask.config.set() at module import time
The module-level call in ag3.py: dask.config.set(**{"array.slicing.split_native_chunks": False}) was historically present to silence a dask `PerformanceWarning` emitted on certain slicing operations. On current dask (>=2025), the `array.slicing.split_native_chunks` config key is unrecognised (returns no default) and the associated `PerformanceWarning` has been removed from `dask.array.slicing`. The setting therefore has no observable effect in any currently-supported dask version. Removing the line directly addresses the filed bug — `import malariagen_data` no longer modifies global dask configuration — without introducing scoped context managers or any other new machinery. Verified: - `import malariagen_data` leaves `dask.config.get('array.slicing. split_native_chunks', 'DEFAULT') == 'DEFAULT'`. - `tests/anoph/test_snp_data.py` (193 tests), `test_frq.py`, `test_cnv_data.py`, `test_hapclust.py`, `test_dipclust.py`, `test_hap_data.py`, `test_aim_data.py` all pass with no new warnings; in particular no `PerformanceWarning` is emitted from any of the `da.take` / `da.compress` call sites in `util.py` or `snp_data.py`. - pre-commit, ruff, ruff-format, mypy all clean.
1 parent b46f450 commit f4dbd66

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

malariagen_data/ag3.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
import sys
22

3-
import dask
43
import pandas as pd # type: ignore
54
import plotly.express as px # type: ignore
65
import malariagen_data
76
from .anopheles import AnophelesDataResource
87

9-
# silence dask performance warnings
10-
dask.config.set(**{"array.slicing.split_native_chunks": False}) # type: ignore
11-
128
MAJOR_VERSION_NUMBER = 3
139
MAJOR_VERSION_PATH = "v3"
1410
CONFIG_PATH = "v3-config.json"

0 commit comments

Comments
 (0)