From d9bc1da907915fabe1410b4524e9642edf5a3600 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20S=C3=B8gaard?= Date: Wed, 31 Aug 2022 13:28:26 +0200 Subject: [PATCH] Create wandb directory if it doesn't exist --- examples/train_model.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/train_model.py b/examples/train_model.py index 67779e302..49439f8ba 100644 --- a/examples/train_model.py +++ b/examples/train_model.py @@ -1,4 +1,4 @@ -import os.path +import os from pytorch_lightning import Trainer from pytorch_lightning.callbacks import EarlyStopping @@ -41,6 +41,9 @@ log_model=True, ) +# -- Ensure that custom output directory exists +os.makedirs(wandb_logger.save_dir, exists_ok=True) + # Main function definition def main():