Skip to content

UserWarning: Your validation_step returned None is issued when using DDP #6137

@dpieczynski

Description

@dpieczynski

🐛 Bug

When using DDP with the validation_step function that doesn't return anything the following warning is printed (Lightning 1.2.0):

pytorch_lightning/utilities/distributed.py:50: UserWarning: Your validation_step returned None. Did you forget to return an output?

This doesn't seem right, as documentation, as far as I'm aware, never mentions a need for doing so.

To Reproduce

Run .fit(...) on a Trainer created with accelerator='ddp'.

Environment

  • PyTorch Version (e.g., 1.0): 1.7.1
  • OS (e.g., Linux): Linux
  • How you installed PyTorch (conda, pip, source): pip
  • Python version: 3.8.6

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinghelp wantedOpen to be worked on

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions