Skip to content

Reduce data embedding in cohorts graph #449

Open
@dcherian

Description

@dcherian

flox/flox/core.py

Lines 1949 to 1961 in b20545b

cohort_index = pd.Index(cohort)
reindexer = (
partial(
reindex_intermediates,
agg=agg,
unique_groups=cohort_index,
array_type=reindex.array_type,
)
if do_simple_combine
else identity
)
subset = subset_to_blocks(intermediate, blks, block_shape, reindexer, chunks_as_array)
dsk |= subset.layer # type: ignore[operator]

Many copies of cohort_index are embedded in the graph. Instead, we should just embed it under its own key, and then add references to the graph layer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions