code hangs when creating a dir #7956
-
Hello, I have written a small class derived from
My intention is to create the directory only once, for the main rank/GPU, that's why I use the Any ideas? What is the standard practice here? Thanks in advance, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Can you try to remove the decorator and instead do this? def on_train_start(self, trainer, pl_module):
print("global_rank is", trainer.global_rank)
if trainer.is_global_zero:
print("create output directory (rank {})".format(self.model.global_rank))
if not isdir(aiOutputDir +"outputs_train"):
os.mkdir(aiOutputDir +"outputs_train") |
Beta Was this translation helpful? Give feedback.
Can you try to remove the decorator and instead do this?