You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Loading from .h5ad taking much more memory than loading same dataset from 10x .h5 #146
When loading in the hdf5 file from 10x to an AnnData object, the whole process uses about 30gb. If I write that AnnData object to disk with adata.write, then try to load that file (with sc.read) I end up using all the memory on the machine (~60g) before segfault-ing. I'd think that any dataset I wrote from memory, I should be able to read back into memory.
I've put the full scripts to reproduce on my system in this gist, but essentially I've run:
# gen_h5ad.pyimportscanpy.apiasscadata=sc.read_10x_h5("{DATAPTH}/1M_neurons_filtered_gene_bc_matrices_h5.h5") # Uses about 30gbadata.write("./write/1M_neurons.h5ad")
# load_anndata.pyimportscanpy.apiasscadata=sc.read("./write/1M_neurons.h5ad") # Ends with segfault
I'm running scanpy installed with conda with the following versions:
Activity
falexwolf commentedon May 5, 2018
Oh, this is of course really strange and shouldn't occur... we'll figure that out! Thank you for mentioning this!
falexwolf commentedon Dec 3, 2018
Finally fixed by @Koncopd via scverse/anndata#85.
sjfleming commentedon Feb 14, 2024
Is this still fixed? I see that loading a 36GB h5ad file requires me to use a machine with 128GB RAM.
ivirshup commentedon Feb 15, 2024
@sjfleming I can't reproduce this behaviour locally anymore. For example:
But you would see this if the file is compressed