LouisFaure / scFates

a scalable python suite for tree inference and advanced pseudotime analysis from scRNAseq data.
https://scfates.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
50 stars 2 forks source link

GPU mode dependencies troubleshooting #20

Closed willey2020 closed 1 year ago

willey2020 commented 1 year ago

Hello! Thank you again for this great package.

When I try to install the GPU mode package of scFates, while I am running scf.tl.tree with GPU mode, it said:

File ~/anaconda3/envs/scFates-gpu2/lib/python3.8/site-packages/scFates/tools/graph_fitting.py:270, in tree(adata, Nodes, use_rep, ndims_rep, weight_rep, method, init, ppt_sigma, ppt_lambda, ppt_metric, ppt_nsteps, ppt_err_cut, ppt_gpu_tpb, epg_lambda, epg_mu, epg_trimmingradius, epg_initnodes, epg_extend_leaves, epg_verbose, device, plot, basis, seed, copy, **kwargs) 268 if method == "ppt": 269 simpleppt.settings.verbosity = settings.verbosity --> 270 ppt = simpleppt.ppt( 271 X, 272 W, 273 Nodes=Nodes, 274 init=init, 275 sigma=ppt_sigma, 276 lam=ppt_lambda, 277 metric=ppt_metric, 278 nsteps=ppt_nsteps, 279 err_cut=ppt_err_cut, 280 device=device, 281 gpu_tbp=ppt_gpu_tpb, 282 seed=seed, 283 progress=settings.verbosity > 1, ... --> 394 from numpy import MachAr # NOQA 396 from numpy import find_common_type # NOQA 397 from numpy import issctype # NOQA

ImportError: cannot import name 'MachAr' from 'numpy' (/home/$$$$$/anaconda3/envs/scFates-gpu2/lib/python3.8/site-packages/numpy/init.py)

It looks like the program cannot import MachAr from the current version of numpy. I tried to downgrade the numpy, but it sounds working for finding MachAr, but then other programs come.

Could you help to suggest how to make the scFates-GPU repo updated for matching current packages? Thank you!

LouisFaure commented 1 year ago

Hi, I have now updated simpleppt package which was causing this error. The main reason is that rapids 21.12 does not seem to work with numpy anymore. I have tested it with the latest version (23.06) and it works. So a new environment should be created with version 23.06 instead of 21.12:

create -n scFates-gpu -c rapidsai -c conda-forge -c nvidia cuml=23.06 cugraph=23.06 python=3.9 cudatoolkit=11.8
willey2020 commented 1 year ago

Thank you so much @LouisFaure !!! I will try it!!

Best, willey

willey2020 commented 1 year ago

Sorry, I forget to close the issue. Yes, it works perfectly following your guidance and get tested. Thank you again!

christophechu commented 5 months ago

@LouisFaure Can We use the new cuml. such as 24.06 or 24.04 supported by CUDA 12.*