Following https://pytorch-lightning.readthedocs.io/en/latest/new-project.html
I tried to log loss values to Tensorboard:
def training_step(self, batch, batch_idx):
loss = ...
result = pl.TrainResult(minimize=loss)
result.log('train_loss', loss)
return result
It seems module "TrainResult" is not present in pytorch-lighting, I'm using latest version (0.8.5)
After browsing various github and SO issues I tried
import TrainResult from pytorch_lightning
but it still doesn't work
Just follow example in https://pytorch-lightning.readthedocs.io/en/latest/new-project.html
def training_step(self, batch, batch_idx):
loss = ...
result = pl.TrainResult(minimize=loss)
result.log('train_loss', loss)
return result
I expect code sample in documentation to work (not crash when importing a pytorch-lightning module)
conda, pip, source): pipHi! thanks for your contribution!, great first issue!
import pytorch_lightning as pl
pl.TrainResult
--> fails
from pytorch_lightning import Trainer, TrainResult
--> fails
Same for pytorch-lightning 8.4 and 8.3
Seems fixed on 0.9.0rc12
it's a new feature of 0.9.0 not available before
@williamFalcon
hello, ok, however may I suggest to version differently https://pytorch-lightning.readthedocs.io documentation?
At the moment default homepage is https://pytorch-lightning.readthedocs.io/en/latest/
Since it seems pytorch lightning team uses "latest" as "real latest" and not "latest stable version", it means the default documentation content presented by Google may significantly differ from what's possible in the version one might install by default from Pypi (which would be the latest stable version for production-oriented people like me, which is the version displayed on pypi pytorch-lightning homepage)
where is this link set in the homepage?
https://pypi.org/project/pytorch-lightning/
https://pytorch-lightning.readthedocs.io/en/latest/. --> referenced on above link