Load model from checkpoint when model is not instantiated in __init__
🚀 Feature
Be able to load a model from a checkpoint path when the model is not instantiated in init
Motivation
Imagine I can only instantiate the model after looking at the train dataset. Ex: for the creation of emb layers you need the number of categories in categorical features.
Pitch
I would like an option where when loading a model from a checkpoint I could tell it I need to run prepare data first so I can instantiate the model for instance.
Alternatives
There are probably better alternatives to this to the option presented in pitch.