Skip to content

Commit ee22026

Browse files
committed
change docs
1 parent 7a16103 commit ee22026

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

docs/index.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,14 @@ Please see our publication {cite}`marconatoSpatialDataOpenUniversal2024` for cit
1616

1717
:::{note}
1818
With dask < 2025.2.0, users can get an error as described in [#1077](https://github.com/scverse/spatialdata/issues/1064). While we tried implementing fixes in SpatialData, it can be that
19-
users perform operations on the `Points` data themselves and get this error. In order to prevent it, please add the following on the line before the error occurs:
20-
`dask.config.set({"optimization.tune.active": False})`. This setting can be set to True after the line where the error occurs.
19+
users perform operations on the `Points` data themselves and get this error. In order to prevent it, users can use a context manager we created.
20+
21+
```python
22+
with disable_dask_tune_optimization() if data.npartitions > 1 else contextlib.nullcontext():
23+
<your operation on points dask dataframe>
24+
```
25+
26+
This will disable dask graph optimization if the dataframe has more than 1 partition and otherwise keep it enabled.
2127
:::
2228

2329
[//]: # "numfocus-fiscal-sponsor-attribution"

0 commit comments

Comments
 (0)