Skip to content

Have an example of showing explicitly how to calculate metrics in DDP for lightning 2.2.0 #20117

@huangfu170

Description

@huangfu170

📚 Documentation

In the lastest version of lightning with DDP training, If I use validation_step_outputs to store validation outputs, how to compute a custom metric in the on_validation_epoch_end function, I now do it with clear in on_validation_epoch_start and compute metric in the on_validation_epoch_end, but in this way, the compute function will be executed n_GPUs times, how can I do the compute function only once?
Thanks for any kind help.

cc @lantiga @Borda

Metadata

Metadata

Labels

docsDocumentation relatedquestionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions