mattertune.configs.loggers
- class mattertune.configs.loggers.CSVLoggerConfig(*, type='csv', save_dir, name='lightning_logs', version=None, prefix='', flush_logs_every_n_steps=100)[source]
- Parameters:
type (Literal['csv'])
save_dir (str)
name (str)
version (int | str | None)
prefix (str)
flush_logs_every_n_steps (int)
- type: Literal['csv']
- save_dir: str
Save directory for logs.
- name: str
'lightning_logs'
.- Type:
Experiment name. Default
- version: int | str | None
Experiment version. If not specified, automatically assigns the next available version. Default:
None
.
- prefix: str
''
.- Type:
String to put at the beginning of metric keys. Default
- flush_logs_every_n_steps: int
100
.- Type:
How often to flush logs to disk. Default
- class mattertune.configs.loggers.TensorBoardLoggerConfig(*, type='tensorboard', save_dir, name='lightning_logs', version=None, log_graph=False, default_hp_metric=True, prefix='', sub_dir=None, additional_params={})[source]
- Parameters:
type (Literal['tensorboard'])
save_dir (str)
name (str | None)
version (int | str | None)
log_graph (bool)
default_hp_metric (bool)
prefix (str)
sub_dir (str | None)
additional_params (dict[str, Any])
- type: Literal['tensorboard']
- save_dir: str
Save directory where TensorBoard logs will be saved.
- name: str | None
'lightning_logs'
. If empty string, no per-experiment subdirectory is used.- Type:
Experiment name. Default
- version: int | str | None
Experiment version. If not specified, logger auto-assigns next available version. If string, used as run-specific subdirectory name. Default:
None
.
- log_graph: bool
Whether to add computational graph to tensorboard. Requires model.example_input_array to be defined. Default:
False
.
- default_hp_metric: bool
Enables placeholder metric with key hp_metric when logging hyperparameters without a metric. Default:
True
.
- prefix: str
''
.- Type:
String to put at beginning of metric keys. Default
- sub_dir: str | None
Sub-directory to group TensorBoard logs. If provided, logs are saved in
/save_dir/name/version/sub_dir/
. Default:None
.
- additional_params: dict[str, Any]
{}
.- Type:
Additional parameters passed to tensorboardX.SummaryWriter. Default
- class mattertune.configs.loggers.WandbLoggerConfig(*, type='wandb', name=None, save_dir='.', version=None, offline=False, dir=None, id=None, anonymous=None, project=None, log_model=False, prefix='', experiment=None, checkpoint_name=None, additional_init_parameters={})[source]
- Parameters:
type (Literal['wandb'])
name (str | None)
save_dir (str)
version (str | None)
offline (bool)
dir (str | None)
id (str | None)
anonymous (bool | None)
project (str | None)
log_model (Literal['all'] | bool)
prefix (str)
experiment (Any | None)
checkpoint_name (str | None)
additional_init_parameters (dict[str, Any])
- type: Literal['wandb']
- name: str | None
None
.- Type:
Display name for the run. Default
- save_dir: str
.
.- Type:
Path where data is saved. Default
- version: str | None
None
.- Type:
Sets the version, mainly used to resume a previous run. Default
- offline: bool
False
.- Type:
Run offline (data can be streamed later to wandb servers). Default
- dir: str | None
None
.- Type:
Same as save_dir. Default
- id: str | None
None
.- Type:
Same as version. Default
- anonymous: bool | None
None
.- Type:
Enables or explicitly disables anonymous logging. Default
- project: str | None
None
.- Type:
The name of the project to which this run will belong. Default
- log_model: Literal['all'] | bool
False
. If ‘all’, checkpoints are logged during training. If True, checkpoints are logged at the end of training. If False, no checkpoints are logged.- Type:
Whether/how to log model checkpoints as W&B artifacts. Default
- prefix: str
''
.- Type:
A string to put at the beginning of metric keys. Default
- experiment: Any | None
None
.- Type:
WandB experiment object. Automatically set when creating a run. Default
- checkpoint_name: str | None
None
.- Type:
Name of the model checkpoint artifact being logged. Default
- additional_init_parameters: dict[str, Any]
{}
.- Type:
Additional parameters to pass to wandb.init(). Default