Skip to content

Commit

Permalink
[tiny] Fix training_dataloader usage to be train_dataloader instead. (#…
Browse files Browse the repository at this point in the history
…2521)

Co-authored-by: Vijay Rajaram <vrajaram3@gatech.edu>
  • Loading branch information
vr140 and Vijay Rajaram committed Jul 6, 2020
1 parent 1098a0d commit 96b32be
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pytorch_lightning/trainer/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1274,17 +1274,17 @@ def check_model_configuration(self, model: LightningModule):
if not self.is_overridden('training_step', model):
raise MisconfigurationException(
'No `training_step()` method defined. Lightning `Trainer` expects as minimum a'
' `training_step()`, `training_dataloader()` and `configure_optimizers()` to be defined.')
' `training_step()`, `train_dataloader()` and `configure_optimizers()` to be defined.')

if not self.is_overridden('train_dataloader', model):
raise MisconfigurationException(
'No `train_dataloader()` method defined. Lightning `Trainer` expects as minimum a'
' `training_step()`, `training_dataloader()` and `configure_optimizers()` to be defined.')
' `training_step()`, `train_dataloader()` and `configure_optimizers()` to be defined.')

if not self.is_overridden('configure_optimizers', model):
raise MisconfigurationException(
'No `configure_optimizers()` method defined. Lightning `Trainer` expects as minimum a'
' `training_step()`, `training_dataloader()` and `configure_optimizers()` to be defined.')
' `training_step()`, `train_dataloader()` and `configure_optimizers()` to be defined.')

# Check val_dataloader, validation_step and validation_epoch_end
if self.is_overridden('val_dataloader', model):
Expand Down
2 changes: 1 addition & 1 deletion tests/trainer/test_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

def test_wrong_train_setting(tmpdir):
"""
* Test that an error is thrown when no `training_dataloader()` is defined
* Test that an error is thrown when no `train_dataloader()` is defined
* Test that an error is thrown when no `training_step()` is defined
"""
tutils.reset_seed()
Expand Down

0 comments on commit 96b32be

Please sign in to comment.