Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WandbLogger save_dir and dir parameters do not work as expected. #19830

Open
Jigar1201 opened this issue Apr 30, 2024 · 0 comments
Open

WandbLogger save_dir and dir parameters do not work as expected. #19830

Jigar1201 opened this issue Apr 30, 2024 · 0 comments
Labels
bug Something isn't working needs triage Waiting to be triaged by maintainers ver: 2.1.x

Comments

@Jigar1201
Copy link

Bug description

The save_dir param is set to . by default and hence if save_dir is not None: is always False.
https://github.com/Lightning-AI/pytorch-lightning/blob/d1949766f8cddd424e2fac3a68b275bebe13d3e4/src/lightning/pytorch/loggers/wandb.py#L327C12-L327C20

When a user only specifies the dir and does specify save_dir, the current implementation ignores dir because save_dir is not None (set to . by default). The priority should be 1. Use save_dir if provided, 2. Use dir if save_dir is not present. 3. Use . which is the default.
If this is not a duplicate of an issue and the workflow is expected as described above, let me know and I will be interested in creating a PR to fix this.

What version are you seeing the problem on?

v2.1

How to reproduce the bug

wandb_logger = WandbLogger(
        project="PROJECT", dir=ignored_dir, id=timestr, name=config.run_id, resume=False, job_type="testing", log_model="all")

Error messages and logs

# Error messages and logs here please

Environment

Current environment
#- Lightning Component (e.g. Trainer, LightningModule, LightningApp, LightningWork, LightningFlow):
#- PyTorch Lightning Version (e.g., 1.5.0):
#- Lightning App Version (e.g., 0.5.2):
#- PyTorch Version (e.g., 2.0):
#- Python version (e.g., 3.9):
#- OS (e.g., Linux):
#- CUDA/cuDNN version:
#- GPU models and configuration:
#- How you installed Lightning(`conda`, `pip`, source):
#- Running environment of LightningApp (e.g. local, cloud):

More info

No response

@Jigar1201 Jigar1201 added bug Something isn't working needs triage Waiting to be triaged by maintainers labels Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage Waiting to be triaged by maintainers ver: 2.1.x
Projects
None yet
Development

No branches or pull requests

1 participant