Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/grelu/resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,13 @@ def _check_wandb(host:str=DEFAULT_WANDB_HOST) -> None:
Args:
host: URL of the Weights & Biases host
"""
assert wandb.login(host=host, anonymous="allow"), f'Weights & Biases (wandb) is not configured, see {host}/authorize'
try:
wandb.login(host=host, anonymous="allow")
except Exception as _:
try:
wandb.login(host=host, anonymous="must", timeout=0)
except Exception as e:
raise RuntimeError(f'Weights & Biases (wandb) is not configured, see {host}/authorize') from e


def projects(host: str=DEFAULT_WANDB_HOST) -> List[str]:
Expand Down
Loading