Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update batch size in LightningModule.datamodule when auto scaling batch size #3266

Merged
merged 16 commits into from
Sep 3, 2020
2 changes: 1 addition & 1 deletion pytorch_lightning/trainer/training_tricks.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def scale_batch_size(self,
f' If this is not the intended behavior, please remove either one.'
)

if hasattr(model.train_dataloader(), 'patch_loader_code'):
if hasattr(model.train_dataloader, 'patch_loader_code'):
rohitgr7 marked this conversation as resolved.
Show resolved Hide resolved
raise MisconfigurationException('The batch scaling feature cannot be used with dataloaders'
' passed directly to `.fit()`. Please disable the feature or'
' incorporate the dataloader into the model.')
Expand Down