/home/anaconda3/envs/omicverse/lib/python3.11/site-packages/cell2location/models/cell2location_model.py:91: RuntimeWarning: invalid value encountered in scalar divide
self.detection_mean = (sp_total / model_kwargs.get("N_cells_per_location", 1)) / sc_total
GPU available: True (cuda), used: True
TPU available: False, using: 0 TPU cores
💡 Tip: For seamless cloud logging and experiment tracking, try installing litlogger to enable LitLogger, which logs metrics and artifacts automatically to the Lightning Experiments platform.
/home/anaconda3/envs/omicverse/lib/python3.11/site-packages/lightning/pytorch/trainer/configuration_validator.py:68: You passed in a val_dataloader but have no validation_step. Skipping val loop.
LOCAL_RANK: 0 - CUDA_VISIBLE_DEVICES: [0]
/home/anaconda3/envs/omicverse/lib/python3.11/site-packages/lightning/pytorch/utilities/_pytree.py:21: isinstance(treespec, LeafSpec) is deprecated, use isinstance(treespec, TreeSpec) and treespec.is_leaf() instead.
/home/anaconda3/envs/omicverse/lib/python3.11/site-packages/lightning/pytorch/trainer/connectors/data_connector.py:434: The 'train_dataloader' does not have many workers which may be a bottleneck. Consider increasing the value of the num_workers argumenttonum_workers=127in theDataLoader` to improve performance.
/home/anaconda3/envs/omicverse/lib/python3.11/site-packages/lightning/pytorch/loops/fit_loop.py:321: The number of training batches (1) is smaller than the logging interval Trainer(log_every_n_steps=10). Set a lower value for log_every_n_steps if you want to see logs for the training epoch.
Exception raised during training. <class 'NameError'> Expected parameter rate (Tensor of shape (1, 1)) of distribution Gamma(concentration: tensor([[10.]], device='cuda:0'), rate: tensor([[nan]], device='cuda:0')) to satisfy the constraint GreaterThan(lower_bound=0.0), but found invalid values:
tensor([[nan]], device='cuda:0')
Trace Shapes:
Param Sites:
Sample Sites:
m_g_mean dist | 1 1
value | 1 1
m_g_alpha_e_inv dist | 1 1
value | 1 1
m_g dist | 1 0
value | 1 0
n_s_cells_per_location dist 2702 1 |
value 2702 1 |
b_s_groups_per_location dist 2702 1 |
value 2702 1 |
z_sr_groups_factors dist 2702 50 |
value 2702 50 |
k_r_factors_per_groups dist | 50 1
value | 50 1
x_fr_group2fact dist | 50 18
value | 50 18
w_sf dist 2702 18 |
value 2702 18 |
When I ran the code mod.train(), the above error message appeared. Please help me solve this as soon as possible. My cell2location is 0.1.5.
/home/anaconda3/envs/omicverse/lib/python3.11/site-packages/cell2location/models/cell2location_model.py:91: RuntimeWarning: invalid value encountered in scalar divide
self.detection_mean = (sp_total / model_kwargs.get("N_cells_per_location", 1)) / sc_total
GPU available: True (cuda), used: True
TPU available: False, using: 0 TPU cores
💡 Tip: For seamless cloud logging and experiment tracking, try installing litlogger to enable LitLogger, which logs metrics and artifacts automatically to the Lightning Experiments platform.
/home/anaconda3/envs/omicverse/lib/python3.11/site-packages/lightning/pytorch/trainer/configuration_validator.py:68: You passed in a
val_dataloaderbut have novalidation_step. Skipping val loop.LOCAL_RANK: 0 - CUDA_VISIBLE_DEVICES: [0]
/home/anaconda3/envs/omicverse/lib/python3.11/site-packages/lightning/pytorch/utilities/_pytree.py:21:
isinstance(treespec, LeafSpec)is deprecated, useisinstance(treespec, TreeSpec) and treespec.is_leaf()instead./home/anaconda3/envs/omicverse/lib/python3.11/site-packages/lightning/pytorch/trainer/connectors/data_connector.py:434: The 'train_dataloader' does not have many workers which may be a bottleneck. Consider increasing the value of the
num_workersargumenttonum_workers=127in theDataLoader` to improve performance./home/anaconda3/envs/omicverse/lib/python3.11/site-packages/lightning/pytorch/loops/fit_loop.py:321: The number of training batches (1) is smaller than the logging interval Trainer(log_every_n_steps=10). Set a lower value for log_every_n_steps if you want to see logs for the training epoch.
Exception raised during training. <class 'NameError'> Expected parameter rate (Tensor of shape (1, 1)) of distribution Gamma(concentration: tensor([[10.]], device='cuda:0'), rate: tensor([[nan]], device='cuda:0')) to satisfy the constraint GreaterThan(lower_bound=0.0), but found invalid values:
tensor([[nan]], device='cuda:0')
Trace Shapes:
Param Sites:
Sample Sites:
m_g_mean dist | 1 1
value | 1 1
m_g_alpha_e_inv dist | 1 1
value | 1 1
m_g dist | 1 0
value | 1 0
n_s_cells_per_location dist 2702 1 |
value 2702 1 |
b_s_groups_per_location dist 2702 1 |
value 2702 1 |
z_sr_groups_factors dist 2702 50 |
value 2702 50 |
k_r_factors_per_groups dist | 50 1
value | 50 1
x_fr_group2fact dist | 50 18
value | 50 18
w_sf dist 2702 18 |
value 2702 18 |
When I ran the code mod.train(), the above error message appeared. Please help me solve this as soon as possible. My cell2location is 0.1.5.