Skip to content

Commit d9bc1da

Browse files
committed
Create wandb directory if it doesn't exist
1 parent 2671f2d commit d9bc1da

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

examples/train_model.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import os.path
1+
import os
22

33
from pytorch_lightning import Trainer
44
from pytorch_lightning.callbacks import EarlyStopping
@@ -41,6 +41,9 @@
4141
log_model=True,
4242
)
4343

44+
# -- Ensure that custom output directory exists
45+
os.makedirs(wandb_logger.save_dir, exists_ok=True)
46+
4447

4548
# Main function definition
4649
def main():

0 commit comments

Comments
 (0)