Closed xiaoxiaozhihuishu closed 2 years ago
Also, when use_gpu=False, the same error occurs mod.train(max_epochs=250, batch_size=2500, train_size=1, lr=0.002, use_gpu=False)
Hi @xiaoxiaozhihuishu
Did you create the conda environment as described here https://github.com/BayraktarLab/cell2location#installation using the latest cell2location? I would recommend re-creating the environment including the PYTHONNOUSERSITE
option.
Please try installing the just released cell2location version (v0.1) as described here https://github.com/BayraktarLab/cell2location#installation
thank you for your reply. This issue has been resolved when I adjust pytorch_lightning = 1.5.10
I am trying to run the new tutorial of cell2location for Mapping human lymph node cell types to 10X Visium. When I try training the regression model and Iam encountering this problem:
from cell2location.models import RegressionModel mod = RegressionModel(adata_ref) mod.train(max_epochs=250, batch_size=2500, train_size=1, lr=0.002, use_gpu=True)
Traceback (most recent call last): File "F:\anaconda3\envs\cell2\lib\code.py", line 90, in runcode exec(code, self.locals) File "", line 1, in
File "F:\anaconda3\envs\cell2\lib\site-packages\cell2location-0.8a0-py3.9.egg\cell2location\models\reference_reference_model.py", line 157, in train
File "F:\anaconda3\envs\cell2\lib\site-packages\scvi\model\base_pyromixin.py", line 138, in train
runner = TrainRunner(
File "F:\anaconda3\envs\cell2\lib\site-packages\scvi\train_trainrunner.py", line 66, in init
self.trainer = Trainer(max_epochs=max_epochs, gpus=gpus, trainer_kwargs)
File "F:\anaconda3\envs\cell2\lib\site-packages\scvi\train_trainer.py", line 139, in init
super().init(
File "F:\anaconda3\envs\cell2\lib\site-packages\pytorch_lightning\utilities\argparse.py", line 339, in insert_env_defaults
return fn(self, kwargs)
File "F:\anaconda3\envs\cell2\lib\site-packages\pytorch_lightning\trainer\trainer.py", line 541, in init
self._callback_connector.on_trainer_init(
File "F:\anaconda3\envs\cell2\lib\site-packages\pytorch_lightning\trainer\connectors\callback_connector.py", line 103, in on_trainer_init
self._configure_progress_bar(progress_bar_refresh_rate, process_position, enable_progress_bar)
File "F:\anaconda3\envs\cell2\lib\site-packages\pytorch_lightning\trainer\connectors\callback_connector.py", line 241, in _configure_progress_bar
raise MisconfigurationException(
pytorch_lightning.utilities.exceptions.MisconfigurationException: Trainer was configured with
enable_progress_bar=False
but foundProgressBar
in callbacks list. RegressionBackgroundDetectionTech model with the following params: n_factors: 34 n_batch: 23 Training status: Not TrainedI can't solve this problem. Thank you for your time.