nntool.wandb.configΒΆ

Functions

init_wandb(args, run_config)

initialize wandb and log the configuration

is_wandb_enabled()

Classes

WandbConfig([api_key_config_file, dir, ...])

Configuration class for Weights and Biases (wandb) integration.

class nntool.wandb.config.WandbConfig(api_key_config_file='', dir=None, project='', entity='', name='', notes='', log_git_hash=True, log_code=True, code_root='.', code_ext=<factory>)[source]ΒΆ

Configuration class for Weights and Biases (wandb) integration.

Parameters:
  • api_key_config_file (str) – The file path to the configuration file containing the wandb API key. The file should be a toml file with a [wandb] section. Default is an empty string.

  • dir (str | None) – The directory to save the wandb logs. Default is None.

  • project (str) – The name of the project in wandb. Default is an empty string.

  • entity (str) – The wandb user or team name. Default is an empty string.

  • name (str) – The name of the wandb run. Leave blank to use the default run name. Default is an empty string.

  • notes (str) – Notes or comments for the wandb run. Default is an empty string.

  • log_git_hash (bool) – Whether to log the current Git hash. Default is True.

  • log_code (bool) – Whether to log the current codebase. Default is True.

  • code_root (str) – The root directory of the codebase to be logged. Default is the current directory (.).

  • code_ext (list[str]) – A list of file extensions for the code files to be logged. Default includes .py and .sh.

nntool.wandb.config.init_wandb(args, run_config)[source]ΒΆ

initialize wandb and log the configuration

Parameters:
  • args (WandbConfig) – WandbConfig object

  • run_config (dict) – configuration dictionary to be logged

Returns:

wandb run object

Return type:

Run | RunDisabled | None