Skip to main content


Set up W&B login credentials.

anonymous: Optional[Literal['must', 'allow', 'never']] = None,
key: Optional[str] = None,
relogin: Optional[bool] = None,
host: Optional[str] = None,
force: Optional[bool] = None,
timeout: Optional[int] = None,
verify: bool = (False)
) -> bool

By default, this will only store the credentials locally without verifying them with the W&B server. To verify credentials, pass verify=True.

anonymous(string, optional) Can be "must", "allow", or "never". If set to "must" we'll always log in anonymously, if set to "allow" we'll only create an anonymous user if the user isn't already logged in.
key(string, optional) authentication key.
relogin(bool, optional) If true, will re-prompt for API key.
host(string, optional) The host to connect to.
force(bool, optional) If true, will force a relogin.
timeout(int, optional) Number of seconds to wait for user input.
verify(bool) Verify the credentials with the W&B server.
boolif key is configured
AuthenticationError - if api_key fails verification with the server UsageError - if api_key cannot be configured and no tty
Was this page helpful?๐Ÿ‘๐Ÿ‘Ž