Skip to content

Commit f4b8351

Browse files
committed
small fix
1 parent b5116be commit f4b8351

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pytorch_lightning/trainer/configuration_validator.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ def verify_loop_configurations(trainer: "pl.Trainer", model: "pl.LightningModule
2424
Checks that the model is configured correctly before the run is started.
2525
2626
Args:
27+
trainer: Lightning Trainer
2728
model: The model to check the configuration.
2829
2930
"""
@@ -218,7 +219,7 @@ def __verify_manual_optimization_support(trainer: "pl.Trainer", model: "pl.Light
218219

219220
def __check_training_step_requires_dataloader_iter(model: "pl.LightningModule"):
220221
"""Check if the current `training_step` is requesting `dataloader_iter`."""
221-
training_step_fx = getattr(model, "training_step")
222+
training_step_fx = model.training_step
222223
if is_param_in_hook_signature(training_step_fx, "dataloader_iter", explicit=True):
223224

224225
if is_overridden("on_train_batch_start", model):

0 commit comments

Comments
 (0)