Skip to content

Commit 5997671

Browse files
committed
🐛 Fix concatenation
1 parent ff2e1bb commit 5997671

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

tiatoolbox/models/engine/engine_abc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ def save_predictions(
646646
keys_to_compute = [k for k in keys_to_compute if k not in zarr_group]
647647
write_tasks = []
648648
for key in keys_to_compute:
649-
dask_array = processed_predictions[key]
649+
dask_array = processed_predictions[key].rechunk("auto")
650650
task = dask_array.to_zarr(
651651
url=save_path,
652652
component=key,

tiatoolbox/models/engine/semantic_segmentor.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1040,7 +1040,9 @@ def merge_vertical_chunkwise(
10401040

10411041
probabilities_da = None
10421042

1043-
curr_chunk, curr_count = next_chunk, next_count
1043+
if next_chunk is not None:
1044+
curr_chunk, curr_count = next_chunk[overlap:], next_count[overlap:]
1045+
10441046
if i + 2 < num_chunks:
10451047
next_chunk = canvas.blocks[i + 2, 0].compute()
10461048
next_count = count.blocks[i + 2, 0].compute()

0 commit comments

Comments
 (0)