Trained regression model does not produce validation or test results #794
Labels
bug
Something isn't working
help wanted
Extra attention is needed
won't fix
This will not be worked on
🐛 Bug
Related to Bug #405
When a regression model has been trained, using either
trainer.validate()
ortrainer.test()
results in an empty dictionary. I posted this a question related to this in Slack last week. I was told that this behaviour arises from using an outdated lightning API and that returninglog
andprogress_bar
is no longer required. Instead, returningself.log
is required.To Reproduce
Steps to reproduce the behaviour:
Code sample
Output
Expected behaviour
For the mean
val_loss
to be returned.It is expected that the error arises from here: https://github.com/PyTorchLightning/lightning-bolts/blob/22e494e546e7fe322d6b4cf36258819c7ba58e02/pl_bolts/models/regression/linear_regression.py#L75-L96
I believe this should be the following code:
This code would need to be changed for both regression models and both
test_epoch_end
functions, too.Environment
PyTorch Version (e.g., 1.0): 1.7.1
OS (e.g., Linux): Linux
How you installed PyTorch (conda, pip, source): pip
Build command you used (if compiling from source):
Python version: 3.7
CUDA/cuDNN version:
GPU models and configuration:
Any other relevant information: PyTorch Lightning 1.5.8; Lightning Bolts v0.5.0
Additional context
Used Google Colab to run the code.
The text was updated successfully, but these errors were encountered: