Skip to content

Add on_validation_model_train/eval to Callback API as well #20441

@yundai424

Description

@yundai424

Description & Motivation

Today on_validation_model_train/eval (similar to on_test_xxx) is only available in LightningModule. It would be helpful to open up this interface to callback as well especially as callbacks are much more pluggable. This will be very helpful for implementing ScheduleFree optimizers which has been proved to be very convergence efficient: https://github.com/facebookresearch/schedule_free/tree/main/schedulefree

I'd be happy to draft a PR if this idea is approved.

Pitch

Add on_validation_model_train/eval (and those for test) to callback API

Alternatives

No response

Additional context

No response

cc @lantiga @Borda

Metadata

Metadata

Assignees

No one assigned

    Labels

    callbackfeatureIs an improvement or enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions