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

Improving scalability for large datasets #10

Open
VladimirShitov opened this issue Oct 11, 2023 · 0 comments
Open

Improving scalability for large datasets #10

VladimirShitov opened this issue Oct 11, 2023 · 0 comments

Comments

@VladimirShitov
Copy link

Hi! I'm using your package a lot for my PhD project, thanks for publishing it! I believe the most exciting discoveries can be made for large datasets. Unfortunately, the current setup of the package doesn't scale very well in terms of RAM usage. Especially this line of code makes me worried (and ruins my pipeline):

    def compute_distance_matrix_from_representations(
    ...
        pairwise_dists = np.zeros((n_cells, n_donors, n_donors))

For a dataset with ~1 Million cells and 1000 donors, it tries to allocate 8.75 TiB of memory. This makes MrVI barely applicable to the most exciting scenarios!

I wonder if users even need this tensor. Maybe it makes sense to aggregate distances somehow? For example, report one matrix of size n_donors * n_donors with an average distance. It could then be calculated in a significantly more memory-efficient way.

I'd be glad to hear your thoughts on this and see the improvement of your wonderful package.

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

No branches or pull requests

1 participant