Lightning-AI / Lightning-AI/pytorch-lightning

Validation is incorrectly run on resume

Open
#20,277 4 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug trainer: validate ver: 2.4.x
Dominant language
Python
Stars
31.4k
Forks
3.8k
Avg merge
6d 7h
Merged PRs (30d)
6

Description

### Bug description

When `val_check_interval` is used, and the model is resumed the validation is run immediately after resume, wasting resources (causing ckpt save, and whole validation run).

https://github.com/Lightning-AI/pytorch-lightning/discussions/18110

### What version are you seeing the problem on?

v2.4

### How to reproduce the bug

_No response_

### Error messages and logs

_No response_

### Environment

_No response_

### More info

_No response_

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or reproduction steps. Start by reading Discussion #18110 and tracing how resume interacts with val_check_interval; done means validation is not triggered immediately after resume and the unnecessary checkpoint save and validation run no longer occur.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.