Remove warnings usage
🚀 Feature
warnings.warn should be replaced by logging.warning
Motivation
In my project, I get the lightning logger (logging.getLogger('lightning')) and override its handlers and format to fit my use case. This allows me to save everything into a log file.
However, there is no way to control warnings behaviour. Its messages cannot be saved to a file and they break any ongoing tqdm bars. We should always use the lightning logger.
Pitch
warnings.warn(*args, **kwargs)
log.warning(*args, **kwargs)