torch.nn.modules.module.ModuleAttributeError: Object has no attribute 'log'
🐛 Bug
Just got started on Pytorch lightening and am experiencing an error, where my classifer is being treated as torch.nn.module instead of pl.LightningModule:

torch.nn.modules.module.ModuleAttributeError: 'LitAutoEncoder' object has no attribute 'log'

To Reproduce
Please run the following code (taken from readme at https://github.com/PyTorchLightning/pytorch-lightning):
import os
import torch
from torch import nn
import torch.nn.functional as F
from torchvision.datasets import MNIST
from torch.utils.data import DataLoader, random_split
from torchvision import transforms
import pytorch_lightning as pl

class LitAutoEncoder(pl.LightningModule):
    def __init__(self):
        super().__init__()
        self.encoder = nn.Sequential(nn.Linear(28 * 28, 128), nn.ReLU(), nn.Linear(128, 3))
        self.decoder = nn.Sequential(nn.Linear(3, 128), nn.ReLU(), nn.Linear(128, 28 * 28))
    
    def forward(self, x):
        # in lightning, forward defines the prediction/inference actions
        embedding = self.encoder(x)
        return embedding

    def training_step(self, batch, batch_idx):
        # training_step defined the train loop. It is independent of forward
        x, y = batch
        x = x.view(x.size(0), -1)
        z = self.encoder(x)
        x_hat = self.decoder(z)
        loss = F.mse_loss(x_hat, x)
        self.log('train_loss', loss)
        return loss

    def configure_optimizers(self):
        optimizer = torch.optim.Adam(self.parameters(), lr=1e-3)
        return optimizer

dataset = MNIST(os.getcwd(), download=True, transform=transforms.ToTensor())
train, val = random_split(dataset, [55000, 5000])

autoencoder = LitAutoEncoder()
trainer = pl.Trainer()
trainer.fit(autoencoder, DataLoader(train))


Expected behavior
This is first example to get started with pytorch lightening mentioned in https://github.com/PyTorchLightning/pytorch-lightning, and it is not working.
Environment

CUDA:
- GPU:
- Tesla K80
- Tesla K80
- Tesla K80
- Tesla K80
- available:         True
- version:           10.1
Packages:
- numpy:             1.19.2
- pyTorch_debug:     True
- pyTorch_version:   1.7.0
- pytorch-lightning: 0.8.5
- tqdm:              4.54.0
System:
- OS:                Linux
- architecture:
- 64bit
-
- processor:
- python:            3.7.0
- version:           #1 SMP Wed Mar 18 09:26:00 CET 2020
CUDA:
- GPU:
- Tesla K80
- Tesla K80
- Tesla K80
- Tesla K80
- available:         True
- version:           10.1
Packages:
- numpy:             1.19.2
- pyTorch_debug:     True
- pyTorch_version:   1.7.0
- pytorch-lightning: 0.8.5
- tqdm:              4.54.0
System:
- OS:                Linux
- architecture:
- 64bit
-
- processor:
- python:            3.7.0
- version:           #1 SMP Wed Mar 18 09:26:00 CET 2020