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

scNym Will Not Install #27

Open
Kwasi-Scientist opened this issue May 10, 2023 · 5 comments
Open

scNym Will Not Install #27

Kwasi-Scientist opened this issue May 10, 2023 · 5 comments

Comments

@Kwasi-Scientist
Copy link

The scNym package (and tutorials) are broken as it attempts to install leidenalg==0.8.0 from cache and fails. Please see the below error message. Please fix the scNym package requirements.

Collecting scnym
Using cached scnym-0.3.2-py2.py3-none-any.whl (68 kB)
Collecting anndata==0.7.4 (from scnym)
Using cached anndata-0.7.4-py3-none-any.whl (118 kB)
Collecting ConfigArgParse==1.1 (from scnym)
Using cached ConfigArgParse-1.1.tar.gz (41 kB)
Preparing metadata (setup.py) ... done
Collecting h5py==2.10.0 (from scnym)
Using cached h5py-2.10.0.tar.gz (301 kB)
Preparing metadata (setup.py) ... done
Collecting leidenalg==0.8.0 (from scnym)
Using cached leidenalg-0.8.0.tar.gz (4.1 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
error: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
Preparing metadata (pyproject.toml) ... error
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

@Kwasi-Scientist
Copy link
Author

Kwasi-Scientist commented May 10, 2023

Also note that this was run using python 3.10.11 which is the default python version on google colab. Switching to lower version of python such as 3.8 will break other packages such as scanpy.

@hy395
Copy link
Contributor

hy395 commented Dec 16, 2023

Hi @Kwasi-Scientist, sorry for the delayed response. I made some updates to the dependency version requirements. If you still wanna try out scnym, could you follow the installation instructions to create a new conda environment with python 3.8 and try installing again from github (by pip install -e scnym/) rather than PyPI?

@weir12
Copy link

weir12 commented Dec 25, 2023

Hi,
I ran scnym exactly following the installation tutorial on github and got the following error
RuntimeError: CUDA error: CUBLAS_STATUS_EXECUTION_FAILED when calling cublasSgemm( handle, opa, opb, m, n, k, &alpha, a, lda, b, ldb, &beta, c, ldc)

The GPU model is A100
Thanks for help

@jacobkimmel
Copy link
Contributor

hey @weir12 -- the error above could stem from either:

  1. A CUDA installation issue. To check that, try to do a matrix multiply on the CUDA device and ensure it passes.

e.g.

import torch


def main():
  A = torch.randn(3,4).cuda()
  B = torch.randn(4,4).cuda()
  
  C = A @ B
  print(C)

main()
  1. A shape mismatch issue in CUDA. This typically happens if the input and output shapes you specify for the model don't match the data you pass in. For example, if you set n_cell_types to 5, but the actual number in your data is 6, or if you set the number of genes to a different number than you passed in. If you used scnym.api.scnym_api, you wouldn't be touching those directly, so the most likely cause is that the object you trained on has a different number of genes present than the object you predicted on.

I hope that helps!

@weir12
Copy link

weir12 commented Dec 26, 2023

Hello @jacobkimmel,

I've managed to resolve the issue by transitioning to a V100 compute cluster. It appears that the A100 is incompatible with older versions of CUDA. If feasible, could you please update the PyTorch version in the dependency file? This change would prompt Conda to install a newer version of CUDA, ensuring compatibility with more recent graphics cards.
https://github.com/calico/scnym/blob/77310272e3b755d1a263c0162fbb421f78305fb7/requirements.txt#L26C1-L26C1
Thank you for your prompt assistance!

Best regards,

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

4 participants