mml.core.scripts.schedulers.train_scheduler
- class TrainingScheduler[source]
New version of the former “optimization” scheduler. Supports the following features: - model training - model prediction - model testing
In addition to the standard hooks (after_preparation_hook, before_finishing_hook) it provides additional hooks that may be overridden by inheriting schedulers: - before_training_hook - after_training_hook
It further allows for task nesting and cross validation.
- after_training_hook(datamodule: LightningDataModule, model: LightningModule, trainer: Trainer, fold: int, task_name: str) None[source]
This hook allows of setup modification after the model fitting ended (and potential lightning tuning). Allows to modify task_weights, data, trainer callbacks, etc. May be overwritten as part of inheriting from TrainScheduler.
- before_training_hook(datamodule: LightningDataModule, model: LightningModule, trainer: Trainer, fold: int, task_name: str) None[source]
This hook allows of setup modification before the model fitting starts (and also before lightning tuning). Allows to modify task_weights, data, trainer callbacks, etc. May be overwritten as part of inheriting from TrainScheduler.