wandb_val_logging

WandbValLoggingLightningModule.

class cneuromax.fitting.deeplearning.litmodule.wandb_val_logging.WandbValLoggingLightningModule(*, logs_val)[source]

Bases: LightningModule

LightningModule that logs val data to wandb.

Ref: wandb

TODO: Save/load attributes to/from checkpoint.

Parameters:

logs_val (bool) –

Whether to activate wandb validation data logging.

logs_val

See logs_val.

Type:

bool

curr_val_epoch

The current validation epoch (can be different from training epoch if validation is called multiple times per training epoch).

Type:

int

wandb_table wandb.Table)

A table to upload to W&B containing validation data.

wandb_columns

A list of strings representing the keys of the dictionaries in val_wandb_data.

Type:

list[str]

val_wandb_data

A list of dictionaries containing validation data relating to one specific example (ex: input_data, logits, …) meant to be logged in val_wandb_data.

Type:

list[list[Any]]

on_fit_start()[source]

Instantiates wandb attributes if logs_val.

Ref: wandb

Return type:

None

on_validation_start()[source]

Resets val_wandb_data if logs_val.

Return type:

None

on_validation_epoch_end()[source]

Uploads val_wandb_data if logs_val.

Return type:

None