Skip to content
Discussion options

You must be logged in to vote

Hello @vikigenius,

I usually specify how my PL model checkpoints, as shown in the code snippet below:

trainer = pl.Trainer(
            [...] # remain trainer params
            callbacks=[

                self.get_model_checkpoint_callback(),  # checkpoint_callback
                self.get_early_stopping_callback(),  # early_stopping_callback
                [...] # other callbacks
            ],
            deterministic=True
        )



def get_model_checkpoint_callback(self):
    return ModelCheckpoint(
        monitor=self.params.val_metric,
        dirpath=self.params.model_checkpoint.dir,
        filename=f"{self.params.model.name}_{self.params.data.name}_{self.params.fold}",
   …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by vikigenius
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment