Skip to content

Commit

Permalink
Create wandb directory if it doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
asogaard committed Aug 31, 2022
1 parent 2671f2d commit d9bc1da
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion examples/train_model.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import os.path
import os

from pytorch_lightning import Trainer
from pytorch_lightning.callbacks import EarlyStopping
Expand Down Expand Up @@ -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():
Expand Down

0 comments on commit d9bc1da

Please sign in to comment.