ksuit.configs.wandb_config

Classes

WandBMode

Enumeration of WandB run modes.

WandBConfig

Immutable configuration object for a WandB run.

Module Contents

class ksuit.configs.wandb_config.WandBMode

Bases: enum.StrEnum

Enumeration of WandB run modes.

ONLINE: Normal WandB mode, logs are synced to the server in real-time. OFFLINE: Logs are stored locally and can be synced later. DISABLED : WandB is disabled entirely; no logs are created.

Initialize self. See help(type(self)) for accurate signature.

ONLINE = 'online'
OFFLINE = 'offline'
DISABLED = 'disabled'
property value: Literal['online', 'offline', 'disabled']

Return the mode value as a Literal type for static type checkers.

Return type:

Literal[‘online’, ‘offline’, ‘disabled’]

class ksuit.configs.wandb_config.WandBConfig

Immutable configuration object for a WandB run.

mode

The WandB execution mode (ONLINE, OFFLINE, or DISABLED).

host

The WandB server hostname (required unless DISABLED).

entity

The WandB entity (user or team name) (required unless DISABLED).

project

The WandB project name (required unless DISABLED).

This class enforces that host, entity, and project must be provided and must be valid strings unless the mode is DISABLED.

mode: WandBMode
host: str | None = None
entity: str | None = None
project: str | None = None
property is_disabled: bool

Return True if WandB mode is DISABLED.

Return type:

bool

property is_offline: bool

Return True if WandB mode is OFFLINE.

Return type:

bool

property is_online: bool

Return True if WandB mode is ONLINE.

Return type:

bool

require_online()

Raise a RuntimeError if WandB is not in ONLINE mode.

Use this in code paths that require a live WandB connection.

Return type:

None