Skip to content

[RFC] Deprecate on_pretrain_routine_start and on_pretrain_routine_end LM/callback hooks #10984

@daniellepintz

Description

@daniellepintz

Proposed refactor

Deprecate these hooks:
https://github.com/PyTorchLightning/pytorch-lightning/blob/6369e3b77fa3f38613b661517f6361f842f611c9/pytorch_lightning/trainer/trainer.py#L1261-L1269

Motivation

Users can use on_train_start, on_fit_start, or setup for the same purpose.

Additional Context

These hooks were originally added in #2850

I see about 30 usages of each hook using grep.app:
https://www.grep.app/search?q=on_pretrain_routine_start
https://www.grep.app/search?q=on_pretrain_routine_end

Part of #7740
Carries forward discussion #9043 on these hooks

cc @Borda @tchaton @rohitgr7 @carmocca @awaelchli @ninginthecloud @daniellepintz

Metadata

Metadata

Labels

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions