Commit 9edd073
authored
Fix normalize dask paths: replace boolean indexing with lazy reductions (#1125)
* Add sweep-performance design spec
Parallel subagent triage + ralph-loop workflow for auditing all
xrspatial modules for performance bottlenecks, OOM risk under
30TB dask workloads, and backend-specific anti-patterns.
* Add sweep-performance implementation plan
7 tasks covering command scaffold, module scoring, parallel subagent
dispatch, report merging, ralph-loop generation, and smoke tests.
* Add sweep-performance slash command
* Fix normalize dask paths: replace boolean indexing with nanmin/nanmax (#1124)
Replace `data[finite_mask]` (boolean fancy indexing that materializes
dask arrays) with `da.where(finite_mask, data, nan)` + `da.nanmin()`/
`da.nanmax()`/`da.nanmean()`/`da.nanstd()` for lazy per-chunk
reductions.
Guard division by zero in rescale with safe_range to prevent inf/nan
in lazy evaluation (da.where evaluates both branches).1 parent d45f27a commit 9edd073
1 file changed
+22
-33
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
| 68 | + | |
68 | 69 | | |
69 | | - | |
70 | | - | |
71 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
85 | 81 | | |
86 | 82 | | |
87 | 83 | | |
| |||
108 | 104 | | |
109 | 105 | | |
110 | 106 | | |
111 | | - | |
112 | | - | |
113 | | - | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
114 | 110 | | |
115 | 111 | | |
116 | 112 | | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
127 | 116 | | |
128 | 117 | | |
129 | 118 | | |
| |||
224 | 213 | | |
225 | 214 | | |
226 | 215 | | |
227 | | - | |
228 | | - | |
229 | | - | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
230 | 219 | | |
231 | 220 | | |
232 | 221 | | |
| |||
254 | 243 | | |
255 | 244 | | |
256 | 245 | | |
257 | | - | |
258 | | - | |
259 | | - | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
260 | 249 | | |
261 | 250 | | |
262 | 251 | | |
| |||
0 commit comments