Skip to content

Commit af65eff

Browse files
author
SeanNaren
committed
Ensure we init the accelerator for the saving function
1 parent acaa995 commit af65eff

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pytorch_lightning/tuner/tuning.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ def on_trainer_init(self, auto_lr_find, auto_scale_batch_size):
3232
self.trainer.auto_lr_find = auto_lr_find
3333
self.trainer.auto_scale_batch_size = auto_scale_batch_size
3434

35+
# setup accelerator for saving hooks
36+
self.trainer.accelerator_backend = self.trainer.accelerator_connector.select_accelerator()
37+
3538
def tune(self, model, train_dataloader, val_dataloaders, datamodule):
3639
# setup data, etc...
3740
self.trainer.train_loop.setup_fit(model, train_dataloader, val_dataloaders, datamodule)

0 commit comments

Comments
 (0)