AttributeError: module 'pytorch_lightning' has no attribute 'TrainResult'
🐛 Bug

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
To Reproduce
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
Expected behavior
I expect code sample in documentation to work (not crash when importing a pytorch-lightning module)
Environment

PyTorch Version (e.g., 1.0): 1.5.0
OS (e.g., Linux): linux
How you installed PyTorch (conda, pip, source): pip
Build command you used (if compiling from source): N/A
Python version: 3.6.9
CUDA/cuDNN version: docker image nvidia/cuda:10.2-cudnn7-devel-ubuntu18.04
GPU models and configuration: Nvidia GTI 1080