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

Use existing wandb login if available. #231

Merged
merged 1 commit into from
Mar 4, 2024

Conversation

mgerstgrasser
Copy link
Contributor

Currently wandb logging is enabled by passing a wandb API key as a CLI argument. However, that makes it easy to accidentally commit an API key as part of a shell script. It is also not necessary, as wandb stores API keys systemwide after running wandb login on the command line.

This PR makes a minimal change to only run wandb.login() in Python if the user is not already logged in. The effect is that you can just pass --use_wandb True (or any value) instead of --use_wandb ....api_key... if you're already logged in. However, if you are not already logged in, this PR does not break things, and will still accept an API key through the CLI argument.

(The only thing I can see that this could possibly break is if you are logged in into one wandb account, and tried to pass an API key for a different wandb account. I don't know if this is a concern?)

@hijkzzz
Copy link
Collaborator

hijkzzz commented Mar 4, 2024

Great MR

@hijkzzz hijkzzz merged commit a90b45b into OpenLLMAI:main Mar 4, 2024
1 check passed
@mgerstgrasser mgerstgrasser deleted the use_existing_wandb_login branch March 4, 2024 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants