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

RuntimeError: value cannot be converted to type uint8_t without overflow: 3416 #52

Open
pinkrabbit0326 opened this issue Apr 10, 2024 · 0 comments

Comments

@pinkrabbit0326
Copy link

Thanks for the brilliant scFEA. However, I am running into a problem. The error is as below:

Load compound name file, the balance output will have compound name.
Load data done.
Starting process data...
Process data done.
Starting train neural network...
  0%|                                                                                                                                                      | 0/100 [00:01<?, ?it/s]
Traceback (most recent call last):
  File "/Users/rg/scFEA/src/scFEA.py", line 370, in <module>
    main(args)
  File "/Users/rg/scFEA/src/scFEA.py", line 235, in main
    geneScale = X_scale_batch, moduleScale = m_scale_batch)
  File "/Users/rg/scFEA/src/scFEA.py", line 50, in myLoss
    if sum(diff > 0) == m.shape[0]: # solve Nan after several iteraions
RuntimeError: value cannot be converted to type uint8_t without overflow: 3416

My script is:

python /Users/rg/scFEA/src/scFEA.py --data_dir /Users/XX/scFEA/data \               
                                                            --input_dir /Users/XX/scFEA/input \
                                                            --moduleGene_file module_gene_complete_mouse_m168.csv\
                                                            --test_file count_matrix.csv\
                                                            --cName_file cName_complete_mouse_c70_m168.csv\
                                                            --sc_imputation True \
                                                            --stoichiometry_matrix cmMat_complete_mouse_c70_m168.csv\
                                                            --output_flux_file output/adj_flux.csv\
                                                            --output_balance_file output/adj_balance.csv

I am using MacOS Ventrua 13.2.1 (22D68) with 64GB memory, and version of related packages are:

 numpy                              1.17.0
 torch                              1.0.1
 pandas                             1.0.5
 matplotlib                         3.2.2
 magic-impute                       3.0.0

I am completely new at python, so I have no idea what caused this error.
Please let know if there are any solutions to this problem.
Thank you

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