Getting Start with Existed Pipeline
I have an existing training pipeline based on Pytorch, but I am interested in applying pytorch_lightning to my workflow. I am also trying to do this is a way that is as least disruptive to my existing code. I noticed there is no way to wrap existing torch.nn.Module models with pytorch_lightning.LightningModule, so I figured I should ask my questions here before spending hours debugging code.
Is this an appropriate way to structure a potential model?
if importlib.util.find_spec('pytorch_lightning') is not None:
    import pytorch_lightning as pl
    backend = pl.LightningModule
else:
    import torch
    backend = torch.nn.Module

class Model(backend):
    def __init__(self, **kwargs):
         pass

    def forward(self, **kwargs):
         pass
This would allow the modules to work with either module depending on what environment is used. However, the examples, you include a bunch of different functions in the model definition (dataloaders, optimizers, training steps, etc.) that are not used in the normal pytorch model structure. Are those additional functions necessary for the model to work and/or are they needed for optimal efficiency? Or can training be done the same as normal?