labomics / midas

MIT License
41 stars 5 forks source link

Error in reproducing the method #4

Closed Vineet-the-git closed 3 months ago

Vineet-the-git commented 7 months ago

Hi, I have been trying to reproduce the results of midas on Dogma dataset. I have completed the preprocessing as intructed in the docs. But when I try to run the method, I get the following error:

$ CUDA_VISIBLE_DEVICES=0 python3 run.py --exp e0 --task dogma_single_full & $ Task: dogma_single_full Experiment: e0 Model: default Input feature numbers: {'atac': 27489, 'rna': 4041, 'adt': 208} Total mini-batch size: 256, GPU number: 1, GPU mini-batch size: 256 Parameter number: 17.756 M [0] {0} Traceback (most recent call last): File "run.py", line 707, in main() File "run.py", line 107, in main train() File "run.py", line 327, in train train_data_loader_cat = get_dataloader_cat("train", train_ratio=None) File "run.py", line 359, in get_dataloader_cat datasets.append(MultimodalDataset(o.task, o.reference, o.data_dir, subset, split, train_ratio=train_ratio)) File "/home/vineet/UGP/midas/modules/datasets.py", line 45, in init assert cell_nums[0] > 0 and len(set(cell_nums)) == 1, \ AssertionError: Inconsistent cell numbers!

Can you explain, why I might be getting this error?

yinleHu commented 7 months ago

I run "CUDA_VISIBLE_DEVICES=1 python run.py --exp e0 --task rnaAtac_rna" and get the same error on our datasets:

Task: rnaAtac_rna Experiment: e0 Model: default

Input feature numbers: {'atac': 13170, 'rna': 3000} Total mini-batch size: 256, GPU number: 1, GPU mini-batch size: 256 Parameter number: 11.501 M Traceback (most recent call last): File "run.py", line 707, in main() File "run.py", line 107, in main train() File "run.py", line 327, in train train_data_loader_cat = get_dataloader_cat("train", train_ratio=None) File "run.py", line 359, in get_dataloader_cat datasets.append(MultimodalDataset(o.task, o.reference, o.data_dir, subset, split, train_ratio=train_ratio)) File "/home/code/midas/modules/datasets.py", line 44, in init assert cell_nums[0] > 0 and len(set(cell_nums)) == 1, \ AssertionError: Inconsistent cell numbers!

wangjing-bio commented 7 months ago

Based on the error message you provided, it appears that there might be an issue with the preprocessing procedure, resulting in various cell numbers for different modalities within the same batch of data. We suggest you examine the preprocessed data in the "data/processed/'your_task'" directory to identify any potential problems. Additionally, it is recommended to verify if your software version is consistent with ours. If the issue persists, we welcome you to provide further information.