wandb_utils
sleap.gui.learning.wandb_utils
¶
Utilities for WandB integration in SLEAP GUI.
Functions:
| Name | Description |
|---|---|
check_wandb_login_status |
Check if wandb is logged in and return status info. |
get_wandb_api_key_help_text |
Generate help text for the WandB API key field based on login status. |
check_wandb_login_status()
¶
Check if wandb is logged in and return status info.
This function checks for cached credentials without calling wandb.login(), which would be slow and print messages to stdout.
Returns:
| Type | Description |
|---|---|
Tuple[bool, Optional[str], Optional[str]]
|
Tuple of (is_logged_in, auth_source, username). auth_source describes how the user is authenticated (env var, netrc, etc.) username is the logged-in username if available, else None. |
Source code in sleap/gui/learning/wandb_utils.py
get_wandb_api_key_help_text(is_logged_in, auth_source)
¶
Generate help text for the WandB API key field based on login status.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
is_logged_in
|
bool
|
Whether wandb is currently authenticated. |
required |
auth_source
|
Optional[str]
|
Description of how the user is authenticated. |
required |
Returns:
| Type | Description |
|---|---|
str
|
Help text string for the API key field. |