Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

obsm (spatial, spatial_fov) size seems unreasonably large. #846

Open
JonatanSahar opened this issue Jun 26, 2024 · 1 comment
Open

obsm (spatial, spatial_fov) size seems unreasonably large. #846

JonatanSahar opened this issue Jun 26, 2024 · 1 comment
Assignees
Labels
question ❓ Further information is requested

Comments

@JonatanSahar
Copy link

Description

After loading a single FOV (CosMx data), which was saved to h5ad with a sparse X, I noticed the memory required was 13GB(!). Investigating with pymplr.asizeof() revealed that:

f1 size in MB: 13403.45
f1.X size in MB: 1.58
f1.obs size in MB: 91.63
f1.obsm size in MB: 13403.45, flat: 0.00
f1.varm size in MB: 13403.45, flat: 0.00
f1.obsm: AxisArrays with keys: spatial, spatial_fov
f1.obsm['spatial'].shape: (2039, 2)
f1.obsm['spatial_fov'].shape: (2039, 2)
f1.obsm.spatial size in MB: 0.03
f1.obsm.spatial_fov size in MB: 0.03

The difference between the size and the flat size suggests that the 13GB are the size of something obsm is referencing to but I couldn't figure out what that is as I can't look inside the AxisArrays object other than the two keys I inpected.

Is this normal?
Would appreciate any help in the matter, thanks!
...

Minimal reproducible example

...

Traceback

...

Version

...

@giovp
Copy link
Member

giovp commented Jul 4, 2024

mmh @JonatanSahar unfortunately I don't really know, I would transfer this issue to anndata as they might have seen this before

@giovp giovp added the question ❓ Further information is requested label Jul 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question ❓ Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants