What is the best practice to define a model?
I want to try many architectures and it is not convenient to copy all the loading/train/val/test logic from file to file. Currently, I create a "container", where I define all the common logic, and then I inherit that class. It looks like this:
class ModelContainer(pl.LightningModule):
    
    def __init__(self,hparams):

        super().__init__()

    def prepare_data(self):
    ....
    def configure_optimizers(self):
    ....
    def train_dataloader(self):
    ....
And in another file I create a model, where I redefine only a forward method:
class MyCoolNet(ModelContainer):
    def __init__(self, hparams):
        super().__init__(hparams)

    def forward(self, x):
    ...
Am I doing it the right way?