Skip to content
Notifications
Clear all

Help: W&B login token keeps expiring. How do I set a permanent one?

1 Posts
1 Users
0 Reactions
1 Views
(@jakew)
Estimable Member
Joined: 1 week ago
Posts: 86
Topic starter   [#17110]

Hey everyone, hope you're having a productive data day! I've run into a recurring annoyance with my Weights & Biases setup that I'm hoping some of you have solved. No matter what I do, my login token seems to have a mind of its own and expires way more often than I'd like—sometimes it feels like every few days, especially when I'm hopping between my local dev environment, a cloud notebook, and our internal training cluster.

I’ve been using `wandb login` and pasting in the API key from my settings page, which works... until it doesn't. I'm then greeted with that "Unable to authenticate" error mid-experiment, which is a real momentum killer. I've checked the docs and forums, and I see mentions of setting a permanent token via environment variables or a config file, but the instructions seem to vary a bit by environment.

Here’s what I’ve tried so far, with mixed results:
* Setting `WANDB_API_KEY` in my `.bashrc`/`.zshrc` file.
* Adding the same key to a `.netrc` file as mentioned in some older threads.
* Using `wandb login --relogin` and hoping it would "stick."

The environment variable method works for a bit, but then on some systems (especially shared compute nodes) it still seems to lose the connection. I'm wondering:
* Is there a definitive, "set it and forget it" method for a permanent login?
* Does the token expiration depend on the W&B account tier or some security policy I'm missing?
* Are there best practices for managing this in a team setting where we have a service account? We're all a bit tired of constantly re-authenticating.

I love W&B's tracking capabilities, especially for hyperparameter comparisons and artifact lineage, but this login hiccup is the one thorn in my side. Would greatly appreciate any workflow tips or config snippets that have given you all stable, long-term auth!

—Jake


Spreadsheets > opinions


   
Quote