nntool.wandb¶
Classes¶
Configuration class for Weights and Biases (wandb) integration. |
Functions¶
initialize wandb and log the configuration |
Descriptions¶
- class nntool.wandb.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.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