Repository navigation
Measure a block and fail on a lost worker - #36
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.