ray.train.lightning.LightningConfigBuilder.trainer
ray.train.lightning.LightningConfigBuilder.trainer#
- LightningConfigBuilder.trainer(**kwargs) ray.train.lightning.lightning_trainer.LightningConfigBuilder[source]#
Set up the configurations of
pytorch_lightning.Trainer.Note that you don’t have to specify the
strategy,deviceandnum_nodesarguments here, since theLightningTrainercreates a PyTorch Lightning Strategy object with the configurations specified in thestrategy()method. Thedeviceandnum_nodesare also configured automatically by the LightningTrainer. If no configuration is specified, it creates aDDPStrategyby default.For
accelerator, currently only"cpu"and"gpu"are supported.- Parameters
kwargs – The initialization arguments for
pytorch_lightning.TrainerFor valid arguments to pass, please refer to: https://lightning.ai/docs/pytorch/stable/common/trainer.html#init.