Customizing hparams after loading checkpoint
❓ Questions and Help
Before asking:

search the issues.
search the docs.

What is your question?
I'm wondering what the best practice for loading a model with different hparams than what is stored in the checkpoint?
I realize I could just load the model and set them afterwards e.g.:
model = model.load_from_checkpoint(args.checkpoint_file) # Load model

# Set hparams etc..
model.hparams.arg1 = 0.0
model.hparams.arg2 = 1.0
 

But the problem is that my  model init function depends on the hparams arg1 and arg2 so they're set too late.
I could also do
checkpoint = torch.load(args.checkpoint_file)
checkpoint['hparams']['arg1'] = 0.0
checkpoint['hparams']['arg2'] = 1.0
model = model._load_state_dict(checkpoint)

The problem here is that i'm using the protected function _load_state_dict. Is there another way of solving this that i've missed? Or could we consider making _load_state_dict public?