lightning_trainer module
Full Documentation for hippynn.experiment.lightning_trainer
module.
Click here for a summary page.
Pytorch Lightning training interface.
This module is somewhat experimental. Using pytorch lightning successfully in a distributed context may require understanding and adjusting the various settings related to parallelism, e.g. multiprocessing context, torch ddp backend, and how they interact with your HPC environment.
- Some features of hippynn experiments may not be implemented yet.
The plotmaker is currently not supported.
- class HippynnLightningModule(*args: Any, **kwargs: Any)[source]
Bases:
LightningModule
A pytorch lightning module for running a hippynn experiment.
- classmethod from_experiment_setup(training_modules: TrainingModules, database: Database | None, setup_params: SetupParams, **kwargs)[source]
Create a lightning module using the same arguments as for
hippynn.experiment.setup_and_train()
.- Parameters:
training_modules
database
setup_params
kwargs
- Returns:
lightning_module, database
- classmethod from_train_setup(training_modules: TrainingModules, database: Database | None, controller: Controller, metric_tracker: MetricTracker, callbacks=None, batch_callbacks=None, **kwargs)[source]
Create a lightning module from the same arguments as for
hippynn.experiment.train_model()
.- Parameters:
training_modules
database
controller
metric_tracker
callbacks
batch_callbacks
kwargs
- Returns:
lightning_module, database