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

torch.OutOfMemoryError: #68

Open
Clapton9527 opened this issue Dec 19, 2024 · 1 comment
Open

torch.OutOfMemoryError: #68

Clapton9527 opened this issue Dec 19, 2024 · 1 comment

Comments

@Clapton9527
Copy link

Hi! Thank you for offering this nice tool! I met a problem when I run
python src/scFEA.py --data_dir data --input_dir input --test_file scFEA_epi.csv --moduleGene_file module_gene_m168.csv --sc_imputation True --stoichiometry_matrix cmMat_c70_m168.csv --output_flux_file output/scRNA_flux_Super.csv --output_balance_file output/scRNA_balance_super.csv

(scFEA) [yjw@localhost scFEA]$ python src/scFEA.py --data_dir data --input_dir input --test_file scFEA_epi.csv --moduleGene_file module_gene_m168.csv --sc_imputation True --stoichiometry_matrix cmMat_c70_m168.csv --output_flux_file output/scRNA_flux_Super.csv --output_balance_file output/scRNA_balance_super.csv
Starting load data...
Calculating MAGIC...
Running MAGIC on 10165 cells and 37141 genes.
Calculating graph and diffusion operator...
Calculating PCA...
Calculated PCA in 26.45 seconds.
Calculating KNN search...
Calculated KNN search in 9.18 seconds.
Calculating affinities...
Calculated affinities in 8.97 seconds.
Calculated graph and diffusion operator in 46.83 seconds.
Running MAGIC with solver='exact' on 37141-dimensional data may take a long time. Consider denoising specific genes with genes=<list-like> or using solver='approximate'.
Calculating imputation...
Calculated imputation in 18.34 seconds.
Calculated MAGIC in 66.27 seconds.
Load compound name file, the balance output will have compound name.
Load data done.
Starting process data...
Traceback (most recent call last):
File "src/scFEA.py", line 370, in
main(args)
File "src/scFEA.py", line 176, in main
X = torch.FloatTensor(X).to(device)
torch.OutOfMemoryError: CUDA out of memory. Tried to allocate 4.01 GiB. GPU 0 has a total capacity of 3.80 GiB of which 3.47 GiB is free. Including non-PyTorch memory, this process has 38.00 MiB memory in use. Of the allocated memory 86.00 KiB is allocated by PyTorch, and 1.92 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation. See documentation for Memory Management (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables)

And I want to know how to solve this problem?

@accelerator819
Copy link

Hello, I met many issues when I tried to build a conda environment for scFEA, most of them are issues related to package version. Can I see your conda environment with package version?

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

2 participants