Skip to main content

login

Set up W&B login credentials.

login(
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.

Arguments
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.
Returns
boolif key is configured
Raises
AuthenticationError - if api_key fails verification with the server UsageError - if api_key cannot be configured and no tty
Was this page helpful?๐Ÿ‘๐Ÿ‘Ž