ModelCheckpoint.save_function documentation
I might be looking in the wrong place but I couldn't find any documentation on ModelCheckpoint.save_function. I found after upgrading to the latest release I have to specify after constructing a ModelCheckpoint or an exception is thrown (maybe it should be a non-optional constructor kwarg since without setting it, the callback isn't really properly constructed?)
I did the following, is this what you expect (transformer is my model instance).
checkpoint_callback = pl.callbacks.ModelCheckpoint(verbose=True, mode='min', monitor='val_loss')
def save_function(filepath, *args):
    torch.save(transformer.state_dict(), filepath)
checkpoint_callback.save_function = save_function