Lightning-AI/pytorch-lightning

W&B `dir` flag doesn't work.

Open

#18,601 opened on Sep 20, 2023

View on GitHub
 (4 comments) (3 reactions) (0 assignees)Python (3,233 forks)batch import
bughelp wantedlogger: wandbver: 2.0.x

Repository metrics

Stars
 (26,687 stars)
PR merge metrics
 (Avg merge 9d 15h) (3 merged PRs in 30d)

Description

Bug description

Initialising WandbLogger with save_dir=... properly sets the directory for the wandb folder with the logs files. dir= doesn't work and wandb is saved in the os.cwd().

What version are you seeing the problem on?

v2.0

How to reproduce the bug

from lightning.pytorch.loggers import WandbLogger
WandbLogger(project="abc-123", config=vars(args), save_dir=cluster.log_dir, mode=("disabled" if args.debug else "online")))

vs

from lightning.pytorch.loggers import WandbLogger
WandbLogger(project="abc-123", config=vars(args), dir=cluster.log_dir, mode=("disabled" if args.debug else "online")))

yield different results.



### Error messages and logs

Error messages and logs here please

N?A

### Environment

Name Version Build Channel

lightning 2.0.2 pypi_0 pypi lightning-cloud 0.5.38 pypi_0 pypi lightning-utilities 0.9.0 pypi_0 pypi pytorch-lightning 2.0.9 pypi_0 pypi wandb 0.15.10 pypi_0 pypi


Ubuntu 22.04. Python 3.10.

### More info

N/A

cc @awaelchli @morganmcg1 @borisdayma @scottire @parambharat

Contributor guide