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

Fixed error when using W&B project name from environment variables #16222

Merged
merged 9 commits into from
May 21, 2023

Conversation

manangoel99
Copy link
Contributor

What does this PR do?

This PR fixes the error caused by the new change of having a default project argument in the WandbLogger. This change would override the project name from environment variables. The fix is to check if the project argument is "lightning_logs" and whether WANDB_PROJECT exists in os.environ. In case both conditions are true, project is set to os.environ["WANDB_PROJECT"]

Fixes #16028

Does your PR introduce any breaking changes? If yes, please list them.

None

Before submitting

  • Was this discussed/approved via a GitHub issue? (not for typos and docs)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes? (if necessary)
  • Did you write any new necessary tests? (not for typos and docs)
  • Did you verify new and existing tests pass locally with your changes?
  • Did you list all the breaking changes introduced by this pull request?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or minor internal changes/refactors)

PR review

Anyone in the community is welcome to review the PR.
Before you start reviewing, make sure you have read the review guidelines. In short, see the following bullet-list:

  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self-explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified

Did you have fun?

Make sure you had fun coding 🙃

@github-actions github-actions bot added the pl Generic label for PyTorch Lightning package label Jan 2, 2023
src/pytorch_lightning/loggers/wandb.py Outdated Show resolved Hide resolved
src/pytorch_lightning/loggers/wandb.py Outdated Show resolved Hide resolved
@carmocca carmocca added bug Something isn't working logger: wandb Weights & Biases labels Jan 4, 2023
@carmocca carmocca added this to the v1.8.x milestone Jan 4, 2023
@carmocca carmocca added the community This PR is from the community label Jan 4, 2023
@Borda Borda modified the milestones: v1.8.x, v1.9 Jan 6, 2023
@Borda Borda modified the milestones: v1.9, v1.9.x Jan 16, 2023
@mergify mergify bot added the has conflicts label Feb 1, 2023
@mergify mergify bot removed the has conflicts label Feb 3, 2023
@Borda
Copy link
Member

Borda commented Apr 27, 2023

@manangoel99 how is it going here? can we help... 🐰

@awaelchli awaelchli self-assigned this May 12, 2023
@awaelchli awaelchli requested a review from carmocca May 12, 2023 23:34
@mergify mergify bot removed the has conflicts label May 12, 2023
@awaelchli
Copy link
Contributor

@Borda @carmocca I took over the PR, it is ready now.

@awaelchli awaelchli added the ready PRs ready to be merged label May 14, 2023
@awaelchli awaelchli merged commit 4d5df5f into Lightning-AI:master May 21, 2023
Borda pushed a commit that referenced this pull request Jun 2, 2023
…16222)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Jirka <jirka.borovec@seznam.cz>
Co-authored-by: Jirka Borovec <6035284+Borda@users.noreply.github.com>
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>

(cherry picked from commit 4d5df5f)
lantiga pushed a commit that referenced this pull request Jun 2, 2023
…16222)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Jirka <jirka.borovec@seznam.cz>
Co-authored-by: Jirka Borovec <6035284+Borda@users.noreply.github.com>
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>

(cherry picked from commit 4d5df5f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working community This PR is from the community logger: wandb Weights & Biases pl Generic label for PyTorch Lightning package ready PRs ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Recent project name in WandbLogger ignores env var WANDB_PROJECT
4 participants