Skip to content

Measure a block and fail on a lost worker - #36

Merged
C1587S merged 4 commits into
mainfrom
block-estimate-and-window-means
Nov 28, 2026
Merged

C1587S merged 4 commits into
mainfrom
block-estimate-and-window-means

Conversation

@C1587S

@C1587S C1587S commented Nov 28, 2026

Copy link
Copy Markdown
Member

Three changes.

The first block of a reduce run is measured, and the manifest records the measurement beside the estimate it was sized from. A run stops when the measurement is more than 2x the estimate. A block size can also be declared instead.

Leaves run in waves. A worker that is lost ends the run at once, naming the leaves in flight and how it ended. On the benchmark this costs 0.4 to 1.1 s of 23 to 69.

Window means takes each window's mask and the key frame once. That is 11% less on the shape the pipeline uses and no number moved.

The first block of a reduce is built alone in a worker and measured as the growth of the worker's peak resident memory over the block, from the peak once the worker has set itself up. A judged block that takes more than twice the estimate refuses the run. [reduce.pandas] targets_per_block declares the size of a block in place of memory_gb.
window_means takes the rows of each window once, looks for an infinite value without copying them, and builds the frame of the group keys once. Every output is the same to the bit, with the same row order and dtypes.
The aggregate stage runs on a ProcessPoolExecutor in waves of n_workers by 16 leaves, each wave on new workers, so a worker that dies stops the run at once, naming the leaves in flight, and nothing is written. The reduce stage's message on a dead worker gives the exit codes and speaks of memory only for SIGKILL.
The declared block size test asked for a measurement of its first block, which a spawned or forked worker on Linux does not give for a block that small, since its peak starts from the peak of the process it came from. It now asks only that the declared size is used, warned about and recorded. A new test forks its workers with a peak that does not rise, so the flat-peak path runs on every platform.
@C1587S
C1587S merged commit 9053886 into main Nov 28, 2026
16 checks passed
@C1587S
C1587S deleted the block-estimate-and-window-means branch November 28, 2026 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant