I have seen this recommendation many times, to save the state dict only, but what about the model instantiation then? How do you know which arguments you used to instantiate the model? Do you write custom code, just to capture those and store these separately?