Skip to content

top_k parameter of ModelCheckpoint default value #20539

@arijit-hub

Description

@arijit-hub

Description & Motivation

I believe that the top_k would highly benefit from the improvement in its default value. Currently, it defaults to 1. However, sometimes, like for example when I am trying to save models every n train steps, it doesn't make sense to save the top_k=1 model. I would presumably like to have it save all the models.

Pitch

So, I would suggest that the default value should be None. In case where every_n_train_steps or every_n_epochs or train_time_interval has some value with monitor=None and the top_k value is not given, i.e., still bears None it should change to -1. However in cases where the monitor parameter is set the top_k value should be changed to 1, if not specified.

Alternatives

No response

Additional context

No response

cc @lantiga @Borda

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureIs an improvement or enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions