Skip to content

Config

Config dataclass #

The options required for a run. This dataclass acts as a structure for the Hydra configs.

For more info, see https://hydra.cc/docs/tutorials/structured_config/schema/

datamodule instance-attribute #

datamodule: Any

Configuration for the datamodule (dataset + transforms + dataloader creation).

This should normally create a LightningDataModule. See the MNISTDataModule for an example.

algorithm instance-attribute #

algorithm: Any

Configuration for the algorithm (a LightningModule).

It is suggested for this class to accept a datamodule and network as arguments. The instantiated datamodule and network will be passed to the algorithm's constructor.

For more info, see the instantiate_algorithm function.

network class-attribute instance-attribute #

network: Any | None = None

The network to use.

trainer class-attribute instance-attribute #

trainer: dict = field(default_factory=dict)

Keyword arguments for the Trainer constructor.

log_level class-attribute instance-attribute #

log_level: str = 'info'

Logging level.

seed class-attribute instance-attribute #

seed: int | None = field(
    default_factory=lambda: randint(0, int(100000.0))
)

Random seed for reproducibility.

If None, a random seed is generated.