OSU-BMBL / scDEAL

Deep Transfer Learning of Drug Sensitivity by Integrating Bulk and Single-cell RNA-seq data
Apache License 2.0
42 stars 11 forks source link

Cannot run the code (Bugs) #5

Open yarinamomo opened 1 year ago

yarinamomo commented 1 year ago

Hi!

When I ran the demo command ''python bulkmodel.py --drug 'I-BET-762' --dimreduce 'AE' --encoder_h_dims "256,256" --predictor_h_dims "128,64" --bottleneck 256 --data_name 'GSE110894' --sampling 'SMOTE' --dropout 0.3 --printgene 'F' -mod 'new' It gave the following error:

bulk_X_allRensor torch.Size([1280, 15962]) ../aten/src/ATen/native/cuda/Loss.cu:271: nll_loss_forward_reduce_cuda_kernel_2d: block: [0,0,0], thread: [2,0,0] Assertion t >= 0 && t < n_classes failed. ../aten/src/ATen/native/cuda/Loss.cu:271: nll_loss_forward_reduce_cuda_kernel_2d: block: [0,0,0], thread: [3,0,0] Assertion t >= 0 && t < n_classes failed. ../aten/src/ATen/native/cuda/Loss.cu:271: nll_loss_forward_reduce_cuda_kernel_2d: block: [0,0,0], thread: [4,0,0] Assertion t >= 0 && t < n_classes failed. ../aten/src/ATen/native/cuda/Loss.cu:271: nll_loss_forward_reduce_cuda_kernel_2d: block: [0,0,0], thread: [7,0,0] Assertion t >= 0 && t < n_classes failed.

But it did give an "integrate_data_GSE110894_drug_I-BET-762_bottle_256_edim_256,256_pdim_128,64_model_AE_dropout_0.3_gene_F_lr_0.01_mod_new_sam_SMOTE". So I went ahead and run the second demo command, and it gave an error:

Traceback (most recent call last): File "scmodel.py", line 794, in run_main(args) File "scmodel.py", line 337, in run_main adata = pp.read_sc_file(data_path) File "/local/data1/user/TF_Project/scDEAL/scanpypip/preprocessing.py", line 52, in read_sc_file seperator = try_seperators(filename, header, index_col, separators) File "/local/data1/user/TF_Project/scDEAL/scanpypip/preprocessing.py", line 38, in try_seperators first_row = pd.read_csv(filename, header=header, index_col=index_col, sep = s, nrows=1) File "/home/.local/lib/python3.8/site-packages/pandas/util/_decorators.py", line 211, in wrapper return func(*args, *kwargs) File "/home/.local/lib/python3.8/site-packages/pandas/util/_decorators.py", line 317, in wrapper return func(args, **kwargs) File "/home/.local/lib/python3.8/site-packages/pandas/io/parsers/readers.py", line 935, in read_csv kwds_defaults = _refine_defaults_read( File "/home/.local/lib/python3.8/site-packages/pandas/io/parsers/readers.py", line 2057, in _refine_defaults_read raise ValueError( ValueError: Specified \n as separator or delimiter. This forces the python engine which does not accept a line terminator. Hence it is not allowed to use the line terminator as separator.

So I didn't get any output of data (GSE110894[a timestamp].h5ad) or models. Could you please take a look at this? Thank you very much!

juychen commented 1 year ago

Hi!

When I ran the demo command ''python bulkmodel.py --drug 'I-BET-762' --dimreduce 'AE' --encoder_h_dims "256,256" --predictor_h_dims "128,64" --bottleneck 256 --data_name 'GSE110894' --sampling 'SMOTE' --dropout 0.3 --printgene 'F' -mod 'new' It gave the following error:

bulk_X_allRensor torch.Size([1280, 15962]) ../aten/src/ATen/native/cuda/Loss.cu:271: nll_loss_forward_reduce_cuda_kernel_2d: block: [0,0,0], thread: [2,0,0] Assertion t >= 0 && t < n_classes failed. ../aten/src/ATen/native/cuda/Loss.cu:271: nll_loss_forward_reduce_cuda_kernel_2d: block: [0,0,0], thread: [3,0,0] Assertion t >= 0 && t < n_classes failed. ../aten/src/ATen/native/cuda/Loss.cu:271: nll_loss_forward_reduce_cuda_kernel_2d: block: [0,0,0], thread: [4,0,0] Assertion t >= 0 && t < n_classes failed. ../aten/src/ATen/native/cuda/Loss.cu:271: nll_loss_forward_reduce_cuda_kernel_2d: block: [0,0,0], thread: [7,0,0] Assertion t >= 0 && t < n_classes failed.

But it did give an "integrate_data_GSE110894_drug_I-BET-762_bottle_256_edim_256,256_pdim_128,64_model_AE_dropout_0.3_gene_F_lr_0.01_mod_new_sam_SMOTE". So I went ahead and run the second demo command, and it gave an error:

Traceback (most recent call last): File "scmodel.py", line 794, in run_main(args) File "scmodel.py", line 337, in run_main adata = pp.read_sc_file(data_path) File "/local/data1/user/TF_Project/scDEAL/scanpypip/preprocessing.py", line 52, in read_sc_file seperator = try_seperators(filename, header, index_col, separators) File "/local/data1/user/TF_Project/scDEAL/scanpypip/preprocessing.py", line 38, in try_seperators first_row = pd.read_csv(filename, header=header, index_col=index_col, sep = s, nrows=1) File "/home/.local/lib/python3.8/site-packages/pandas/util/_decorators.py", line 211, in wrapper return func(*args, *kwargs) File "/home/.local/lib/python3.8/site-packages/pandas/util/_decorators.py", line 317, in wrapper return func(args, **kwargs) File "/home/.local/lib/python3.8/site-packages/pandas/io/parsers/readers.py", line 935, in read_csv kwds_defaults = _refine_defaults_read( File "/home/.local/lib/python3.8/site-packages/pandas/io/parsers/readers.py", line 2057, in _refine_defaults_read raise ValueError( ValueError: Specified \n as separator or delimiter. This forces the python engine which does not accept a line terminator. Hence it is not allowed to use the line terminator as separator.

So I didn't get any output of data (GSE110894[a timestamp].h5ad) or models. Could you please take a look at this? Thank you very much!

Hi, sorry for my late reply because I am quite busy recently. I will try to reproduce the problem and test it soon.