ddp help #13032
-
Training a simple autoencoder as part of a larger project, and using it to get back up to speed on Lightning. Pytorch Lightning v 1.6.2, AMD Ryzen, 2 A6000s, Ubuntu 21.10, using DDP. I have 2 questions:
Any help appreciated. seth |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I resolved the first question. For those with a similar problem: Put user interaction into a function like so:
Call it before the trainer.fit(), and it will only run once. See utilities docs for details ... |
Beta Was this translation helpful? Give feedback.
I resolved the first question. For those with a similar problem:
There is a set of rank_zero decorators which can be imported from utilities. The one I used is imported like so:
from pytorch_lightning.utilities.rank_zero import rank_zero_only
Put user interaction into a function like so:
Call it before the trainer.fit(), and it will only run once.
See utilities docs for details ...