Skip to content

More granular callbacks #1440

@awaelchli

Description

@awaelchli

🚀 Make callback system more granular

Motivation

I am currently implementing #765 (make progress bar into a callback) and I need additional callback methods to do this.

Pitch

introduce these new callback methods:

  • on_train_batch_start (currently named on_batch_start)
  • on_train_batch_end (currently named on_batch_end)
  • on_val_batch_start
  • on_val_batch_end
  • on_test_batch_start
  • on_test_batch_end

and make on_batch_start run on any of the above *_start (same for on_batch_end)

Further suggestions:

  • introduce on_train_epoch_start, on_val_epoch_start, on_test_epoch_start and corresponding *_end methods.

Alternatives

Keep as is, but I don't know how to implement the progress bar callback otherwise for validation/test updates.

Metadata

Metadata

Assignees

Labels

featureIs an improvement or enhancementhelp wantedOpen to be worked onwon't fixThis will not be worked on

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions