Question:Can I use multiple accounts (i.e. adopting multiple API keys) in one machine?

Can I use multiple accounts (i.e. adopting multiple API keys) in one machine?
Are there any ways I can do that?
Looking forward to helping! :slight_smile:

Hi @correr!

Yes, you can simply call wandb login from your terminal and pass in the API key from Weights & Biases when the prompt is displayed. This will log you in to the desired account.

By default, we store the API key of the last logged in account on your device and you will be logged in to the last account you logged in to every time you call wandb.init()

Thanks,
Ramit

Hi Correr,

We wanted to follow up with you regarding your support request as we have not heard back from you. Please let us know if we can be of further assistance or if your issue has been resolved.

Best,
Weights & Biases

Hi Correr, since we have not heard back from you we are going to close this request. If you would like to re-open the conversation, please let us know!

Hi, Goolry!

What I want to do is to use multiple accounts simultaneously, that is, I use my API key in a running program and at the same time the other guy can use his/her API key in his/her running program.

This is because my fellow and I use the same server in our lab and both of us want to use W&B.

I am curious about how to solve this problem.

Hey @correr,

I see. You should be able to log into an individual account directly from your python script:

wandb.login(key = '<YOUR-KEY-HERE>')
wandb.init(...)

This will allow you to log in directly on a per-process basis through the python script.

Thanks,
Ramit

1 Like

You can also define environment variables to control who is logged in.

export WANDB_API_KEY=123alksdjasl

Running that and then running your script will control which account is logged in.

1 Like

Thank for your suggestion! I will try it at my code.

Thank for your suggestion! It’s a more direct way to solve this problem.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.