You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wasn't able to find channels for some of the dependencies you specified so I'm running scMDC in an environment with newest package versions. When I perform run_scMDC_batch.py I do not get this error. When I perform run_scMDC.py:
''' python -u ./scMDC/scMDC/src/run_scMDC.py \ --data_file error_test_set.h5 \ --save_dir error_test_out \ --embedding_file --prediction_file \ --batch_size 256 \ --device cpu \ --no_labels \ --n_clusters 5
'''
I get the following error after the pre-training stage:
'''
Pretrain epoch 391, Total loss:14.063442, ZINB loss1:5.921021, ZINB loss2:8.142051, KL loss:0.370482
Pretraining time: 149 seconds.
Traceback (most recent call last):
File "/pool0/scratch/devine/YG_tissue_cluster/./scMDC/scMDC/src/run_scMDC.py", line 145, in
latent = model.encodeBatch(torch.tensor(adata1.X).to(args.device), torch.tensor(adata2.X).to(args.device))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/pool0/scratch/devine/YG_tissue_cluster/scMDC/scMDC/src/scMDC.py", line 146, in encodeBatch
z,,,,,,,, = self.forwardAE(inputs1, inputs2)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/pool0/scratch/devine/YG_tissue_cluster/scMDC/scMDC/src/scMDC.py", line 116, in forwardAE
h = self.encoder(x)
^^^^^^^^^^^^^^^
File "/scratch/devine/envs/.conda/envs/scMDC/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/scratch/devine/envs/.conda/envs/scMDC/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/scratch/devine/envs/.conda/envs/scMDC/lib/python3.12/site-packages/torch/nn/modules/container.py", line 219, in forward
input = module(input)
^^^^^^^^^^^^^
File "/scratch/devine/envs/.conda/envs/scMDC/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/scratch/devine/envs/.conda/envs/scMDC/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/scratch/devine/envs/.conda/envs/scMDC/lib/python3.12/site-packages/torch/nn/modules/linear.py", line 117, in forward
return F.linear(input, self.weight, self.bias)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: mat1 and mat2 must have the same dtype, but got Double and Float
'''
The error is reproducible using the following code block:
'''
np.random.seed(123)
with h5py.File('error_test_set.h5', 'w') as f:
f.create_dataset('X1', data=np.random.randint(low=1, high=300, size=(3148, 512)).astype(np.float64))
f.create_dataset('X2', data=np.random.randint(low=1, high=1000, size=(3148, 18)).astype(np.float64))
'''
and my environment package versions are listed here (should be most current):
'''
name: scMDC
channels:
defaults
dependencies:
python=3.12.2
pytorch=2.4.1
leidenalg=0.10.2
python-igraph=0.11.6
scanpy=1.10.3
scikit-learn=1.5.2
numpy=1.26.4
'''
Would love to be able to deploy this algorithm, let me know how to proceed, thanks!
The text was updated successfully, but these errors were encountered:
Hi,
I wasn't able to find channels for some of the dependencies you specified so I'm running scMDC in an environment with newest package versions. When I perform run_scMDC_batch.py I do not get this error. When I perform run_scMDC.py:
'''
python -u ./scMDC/scMDC/src/run_scMDC.py \ --data_file error_test_set.h5 \ --save_dir error_test_out \ --embedding_file --prediction_file \ --batch_size 256 \ --device cpu \ --no_labels \ --n_clusters 5
'''
I get the following error after the pre-training stage:
'''
Pretrain epoch 391, Total loss:14.063442, ZINB loss1:5.921021, ZINB loss2:8.142051, KL loss:0.370482
Pretraining time: 149 seconds.
Traceback (most recent call last):
File "/pool0/scratch/devine/YG_tissue_cluster/./scMDC/scMDC/src/run_scMDC.py", line 145, in
latent = model.encodeBatch(torch.tensor(adata1.X).to(args.device), torch.tensor(adata2.X).to(args.device))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/pool0/scratch/devine/YG_tissue_cluster/scMDC/scMDC/src/scMDC.py", line 146, in encodeBatch
z,,,,,,,, = self.forwardAE(inputs1, inputs2)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/pool0/scratch/devine/YG_tissue_cluster/scMDC/scMDC/src/scMDC.py", line 116, in forwardAE
h = self.encoder(x)
^^^^^^^^^^^^^^^
File "/scratch/devine/envs/.conda/envs/scMDC/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/scratch/devine/envs/.conda/envs/scMDC/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/scratch/devine/envs/.conda/envs/scMDC/lib/python3.12/site-packages/torch/nn/modules/container.py", line 219, in forward
input = module(input)
^^^^^^^^^^^^^
File "/scratch/devine/envs/.conda/envs/scMDC/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/scratch/devine/envs/.conda/envs/scMDC/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/scratch/devine/envs/.conda/envs/scMDC/lib/python3.12/site-packages/torch/nn/modules/linear.py", line 117, in forward
return F.linear(input, self.weight, self.bias)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: mat1 and mat2 must have the same dtype, but got Double and Float
'''
The error is reproducible using the following code block:
'''
np.random.seed(123)
with h5py.File('error_test_set.h5', 'w') as f:
f.create_dataset('X1', data=np.random.randint(low=1, high=300, size=(3148, 512)).astype(np.float64))
f.create_dataset('X2', data=np.random.randint(low=1, high=1000, size=(3148, 18)).astype(np.float64))
'''
and my environment package versions are listed here (should be most current):
'''
name: scMDC
channels:
dependencies:
'''
Would love to be able to deploy this algorithm, let me know how to proceed, thanks!
The text was updated successfully, but these errors were encountered: