Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version of pytorch-lightning #4

Closed
cherrysherryplus opened this issue Dec 21, 2023 · 11 comments
Closed

Version of pytorch-lightning #4

cherrysherryplus opened this issue Dec 21, 2023 · 11 comments

Comments

@cherrysherryplus
Copy link

Hi! It is a great and intersting work. But I am wondering the version of pytorch-lightning you used because I met some problem with the latest version (v2.x)

@Ephemeral182
Copy link
Owner

Hi, we train our model by PyTorch-lightning 1.8.0 previously, but I tested my model in latest version of PyTorch-lightning (v2.x) before I release my code. I think it's ok to use this code. Could you share your problems encountered?

@cherrysherryplus
Copy link
Author

cherrysherryplus commented Dec 21, 2023

Thanks for your reply! I have run the code successfully after I commented the 'logger': logger in https://github.com/Ephemeral182/UDR-S2Former_deraining/blob/main/train.py#L226.


Before that, the problem is shown as the following screenshot:
image

@Ephemeral182
Copy link
Owner

Thank you for sharing!

@cherrysherryplus
Copy link
Author

cherrysherryplus commented Dec 21, 2023

Hi! I have found one possible solution. The problem may come from the configuration of using TensorBoardLogger in main.py.

The original version (L31-L32, L226) is:

from pytorch_lightning.loggers import WandbLogger,TensorBoardLogger
logger = TensorBoardLogger(r'tb_logs', name='udrs2former')
trainer_defaults = {'devices':[1,2,3],'callbacks':[checkpoint_callback,lr_monitor],'logger':logger}

The first block may be removed and the second can be altered as follows:

train_defaults = {
  # configs of device and callbacks goes here...
  'logger': {
      'class_path': 'lightning.pytorch.loggers.TensorBoardLogger',
      'init_args': {
          'save_dir': 'tb_logs',
          'name': 'udrs2former'
      }
  }
}

@Ephemeral182
Copy link
Owner

This may be caused by the updated version. This is indeed a good solution. Thank you.

@Madeline-hyh
Copy link

Hello, I have the same problem, and when I change the logger, I have another problem, can you please see it? thanks!
image

@Feecuin
Copy link

Feecuin commented Apr 2, 2024

你好,我也有同样的问题,当我更换记录器时,我又遇到了另一个问题,你能看看吗?谢谢! 图像

你好,请问你解决了这个问题了吗?

@Madeline-hyh
Copy link

没有~

@Feecuin
Copy link

Feecuin commented Apr 2, 2024

没有~

我也是这个问题,我打算降一下pytorch版本了

@Madeline-hyh
Copy link

可以试试~

@cherrysherryplus
Copy link
Author

可以试试~

Hello, I have the same problem, and when I change the logger, I have another problem, can you please see it? thanks! image

感觉2.x版本的lightning的话,可以试试用jsonargparse里的lazyinstance类包裹一下TensorBoardLogger

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants