-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
There is a memory leak users will cause if side inputs like land_sea_mask or thresholds are not materialized.
Here is the step-by-step for land_sea_mask.
- inside
ComputeStatisticsAggregateAndPrepareForCombine.process, the lineaggregation_state = self.aggregator.aggregate_stat_var(stat)makes a non-materializedaggregation_stateviabinning_method.create_bin_mask(stat)which creates a non-materialized maskxr.dot(stat, *weights, *bin_masks, dims=reduce_dims_set)
- During
CombiningSum, theaccumulatoris not materialized- Memory grows > O(N) (because a growing Dask graph is being built?)
I see some solutions
- Document and
logging.warningto encourage users to materialize - Materialize side inputs (
land_sea_mask,thresholds) when they are passed to the user class in__init__ - Materialize as late as possible, in case the side input is sliced first.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels