Skip to content

store masks in geff as bool, not uint64#318

Merged
TeunHuijben merged 1 commit into
royerlab:mainfrom
TeunHuijben:masks-bool-not-unit64-in-geff
Jul 13, 2026
Merged

store masks in geff as bool, not uint64#318
TeunHuijben merged 1 commit into
royerlab:mainfrom
TeunHuijben:masks-bool-not-unit64-in-geff

Conversation

@TeunHuijben

Copy link
Copy Markdown
Contributor

In our original understanding, geff has the requirement that variable length attributes must be stored as unit64.

However, there is nuance to this. A variable-length attribute has values (indices) and data (the actual data). Geff only enforced the values to be unit64, not the data! So it is perfectly fine for us to store mask as bool, as long as the values are still unit64.

Saving the masks as bool saves us a lot of memory (64x). Not for the on-disc geff, because the zarr compression is the same for uint64/bool, but for loading and in-memory graphs, this is a huge win.

This PR is a draft to see if it works.

Any ideas, @JoOkuma?

@JoOkuma

JoOkuma commented Jul 8, 2026

Copy link
Copy Markdown
Member

@TeunHuijben, I'm surprised this worked.
If I recall correctly, at some point, this would fail with the geff round-trip tests.
LGTM!

@TeunHuijben
TeunHuijben merged commit 39dccf3 into royerlab:main Jul 13, 2026
7 checks passed
@TeunHuijben
TeunHuijben deleted the masks-bool-not-unit64-in-geff branch July 13, 2026 23:03
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.

2 participants