Skip to main content
To manage two W&B accounts from the same machine, store both API keys in a file outside your repository, then load the key you need at runtime. This approach keeps secret keys out of source control.
if os.path.exists("~/keys.json"):
    os.environ["WANDB_API_KEY"] = json.loads("~/keys.json")["work_account"]

Environment Variables