Skip to content

When is on_validation_epoch_start / on_validation_epoch_end being called? #2816

@siahuat0727

Description

@siahuat0727

❓ Questions and Help

What is your question?

When is on_validation_epoch_start / on_validation_epoch_end being called?
It there a doc that explains the order of the callback function being called?

I need a callback function that will be called at the end of every validation epoch.
I read the callback docs and I think on_validation_epoch_end is the target function I need to override. But after my trial and error, I found that it is on_validation_end that meets my needs.

What have you tried?

And I found that on the latest version, nobody will call on_validation_epoch_start except the function on_validation_epoch_start itself in "callback_hook.py". Is it means that on_validation_epoch_start will never be called?

~/pytorch-lightning$ grep -rH "on_validation_epoch_start"
pytorch_lightning/core/hooks.py:    def on_validation_epoch_start(self) -> None:
pytorch_lightning/callbacks/base.py:    def on_validation_epoch_start(self, trainer, pl_module):
pytorch_lightning/trainer/callback_hook.py:    def on_validation_epoch_start(self):
pytorch_lightning/trainer/callback_hook.py:            callback.on_validation_epoch_start(self, self.get_model())

What's your environment?

  • OS: Linux
  • Packaging: pip
  • Version: 0.9.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions