Initialization of model checkpoint dirpath

Does the model checkpoint’s dirpath attribute get altered between the callback init and on_train_start ?

Context: I’ve extended the default Lightning ModelCheckpoint callback. In the init , I set dirpath/filepath = None by default, and have some custom logic to initialize it in on_train_start . However, in on_train_start I see that the value for the directory is set! But not by me

[2020-09-10 23:04:33,028][model_checkpoint][INFO] - dirpath: None, storage bucket: <bucket>, filename: {epoch}
2020-09-10 23:05:05,897][model_checkpoint][INFO] - In on_train_start: storage bucket=<bucket>, dirpath = /data/users/ananthsub/.../outputs/2020-09-10/23-04-30/checkpoints

So I have this horrible horrible hack where in the callback constructor, I set self.dirpath_shadow = self.dirpath as a copy, and in on_train_start I set self.dirpath = self.dirpath_shadow as the first line, and then my callback works as expected. But I have no clue how/where this field is being modified to start with

Looks like the dirpath logic moved to on_pretrain_routine_start whereas I’m overriding on_train_start . I’ve resolved this by overriding the right callback method