diff --git a/pytorch_lightning/trainer/configuration_validator.py b/pytorch_lightning/trainer/configuration_validator.py index 5eab3335ac6a9f..9bc2408f9ba0ef 100644 --- a/pytorch_lightning/trainer/configuration_validator.py +++ b/pytorch_lightning/trainer/configuration_validator.py @@ -41,7 +41,7 @@ def verify_loop_configurations(trainer: "pl.Trainer", model: "pl.LightningModule __verify_predict_loop_configuration(model) __verify_dp_batch_transfer_support(trainer, model) _check_add_get_queue(model) - # TODO(@daniellepintz): Delete _check_progress_bar in v1.7 + # TODO: Delete _check_progress_bar in v1.7 _check_progress_bar(model) # TODO: Delete _check_on_post_move_to_device in v1.7 _check_on_post_move_to_device(model) @@ -151,9 +151,9 @@ def __verify_eval_loop_configuration(model: "pl.LightningModule", stage: str) -> has_step = is_overridden(step_name, model) if has_loader and not has_step: - rank_zero_warn(f"you passed in a {loader_name} but have no {step_name}. Skipping {stage} loop") + MisconfigurationException(f"You defined `{loader_name}` but have not defined `{step_name}` on your Lightning Module.") if has_step and not has_loader: - rank_zero_warn(f"you defined a {step_name} but have no {loader_name}. Skipping {stage} loop") + MisconfigurationException(f"You defined `{step_name}` but have not defined `{loader_name}` on your Lighning Module.") # ---------------------------------------------- # verify model does not have @@ -178,7 +178,7 @@ def __verify_eval_loop_configuration(model: "pl.LightningModule", stage: str) -> def __verify_predict_loop_configuration(model: "pl.LightningModule") -> None: has_predict_dataloader = is_overridden("predict_dataloader", model) if not has_predict_dataloader: - raise MisconfigurationException("Dataloader not found for `Trainer.predict`") + raise MisconfigurationException("Please define `predict_dataloader` on your Lightning Module") # ---------------------------------------------- # verify model does not have # - on_predict_dataloader