[BUG] Predict not working without progress bar
🐛 Bug
trainer.predict(...) does not work when progress_bar_refresh_rate=0
To Reproduce
import pl_bolts
import pytorch_lightning as pl
from pl_bolts.datamodules import SklearnDataModule
from sklearn.datasets import load_boston

X, y = load_boston(return_X_y=True)
dm = SklearnDataModule(X, y)

class LinearRegression(pl_bolts.models.regression.LinearRegression):
    def predict_step(self, batch, batch_idx, dataloader_idx=None):
        x, y = batch
        x_hat = self(x)
        return x_hat

    def predict(self, *args, **kwargs):  # for version 1.2.6
        return self.predict_step(*args, **kwargs)

model = LinearRegression(input_dim=13)
trainer = pl.Trainer(max_epochs=1, progress_bar_refresh_rate=0) # works with any other value than 0
trainer.fit(model, train_dataloader=loaders.train_dataloader(), val_dataloaders=loaders.val_dataloader())

_=trainer.predict(dataloaders=[dm.test_dataloader()])
Bug:
/usr/local/lib/python3.8/dist-packages/pytorch_lightning/trainer/predict_loop.py in setup(self, model, max_batches, dataloaders)
     56         self._predictions = [[] for _ in range(self.num_dataloaders)]
     57 
---> 58         self.trainer._progress_bar_callback.on_predict_start(self.trainer, self.trainer.lightning_module)
     59 
     60     def _get_num_dataloaders(self, dataloaders):

AttributeError: 'NoneType' object has no attribute 'on_predict_start'

Environment
pl version : 1.2.6