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

validation_epoch_end problem, how can I fix it? #1

Open
OrilinZ opened this issue Jun 15, 2023 · 1 comment
Open

validation_epoch_end problem, how can I fix it? #1

OrilinZ opened this issue Jun 15, 2023 · 1 comment

Comments

@OrilinZ
Copy link

OrilinZ commented Jun 15, 2023

/usr/lib/python3/dist-packages/requests/init.py:89: RequestsDependencyWarning: urllib3 (2.0.3) or chardet (3.0.4) doesn't match a supported version!
warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported "
2023-06-15 11:20:10.232 | INFO | diffusion_categorical:init:105 - [compute transition matrix]: gaussian
2023-06-15 11:20:25.947 | INFO | diffusion_categorical:init:125 - [trainsition matrix]: torch.Size([1000, 256, 256])
2023-06-15 11:20:25.947 | INFO | diffusion_categorical:init:128 - [Construct transition matrices for q(x_t|x_start)]
2023-06-15 11:20:26.259 | INFO | diffusion_categorical:init:140 - [tilde(Q)t]: torch.Size([1000, 256, 256])
CometLogger will be initialized in offline mode
GPU available: True (cuda), used: True
TPU available: False, using: 0 TPU cores
IPU available: False, using: 0 IPUs
HPU available: False, using: 0 HPUs
Traceback (most recent call last):
File "main.py", line 256, in
trainer.fit(d3pm, ckpt_path=args.resume)
File "/home/zhz/.local/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 531, in fit
call._call_and_handle_interrupt(
File "/home/zhz/.local/lib/python3.8/site-packages/pytorch_lightning/trainer/call.py", line 41, in _call_and_handle_interrupt
return trainer.strategy.launcher.launch(trainer_fn, *args, trainer=trainer, **kwargs)
File "/home/zhz/.local/lib/python3.8/site-packages/pytorch_lightning/strategies/launchers/subprocess_script.py", line 91, in launch
return function(*args, **kwargs)
File "/home/zhz/.local/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 570, in _fit_impl
self._run(model, ckpt_path=ckpt_path)
File "/home/zhz/.local/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 923, in _run
_verify_loop_configurations(self)
File "/home/zhz/.local/lib/python3.8/site-packages/pytorch_lightning/trainer/configuration_validator.py", line 36, in _verify_loop_configurations
__verify_train_val_loop_configuration(trainer, model)
File "/home/zhz/.local/lib/python3.8/site-packages/pytorch_lightning/trainer/configuration_validator.py", line 84, in __verify_train_val_loop_configuration
raise NotImplementedError(
NotImplementedError: Support for validation_epoch_end has been removed in v2.0.0. DiffusionModel implements this method. You can use the on_validation_epoch_end hook instead. To access outputs, save them in-memory as instance attributes. You can find migration examples in Lightning-AI/pytorch-lightning#16520.

@ljh0v0
Copy link
Owner

ljh0v0 commented Jun 15, 2023

Hi,

Seems Pytorch-lightning removed the validation _epoch_end method in version 2.0.0. You can either downgrade the Pytorch-lightning version to 1.8.1 or adapt the validation_epoch_end part referring to this.

Good luck!

Jiahe

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

2 participants