From ed084971f5fddaa638cbfd799020a403d7c035ab Mon Sep 17 00:00:00 2001 From: ananthsub Date: Thu, 30 Sep 2021 17:10:49 -0700 Subject: [PATCH 1/2] Update trainer.py --- pytorch_lightning/trainer/trainer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pytorch_lightning/trainer/trainer.py b/pytorch_lightning/trainer/trainer.py index 7a85afeb70928..241f723957b23 100644 --- a/pytorch_lightning/trainer/trainer.py +++ b/pytorch_lightning/trainer/trainer.py @@ -387,7 +387,7 @@ def __init__( gpu_ids, tpu_cores = self._parse_devices(gpus, auto_select_gpus, tpu_cores) # init connectors - self.config_validator = ConfigValidator(self) + self._config_validator = ConfigValidator(self) self.data_connector = DataConnector(self, multiple_trainloader_mode) self.optimizer_connector = OptimizerConnector(self) @@ -973,7 +973,7 @@ def _run(self, model: "pl.LightningModule") -> Optional[Union[_EVALUATE_OUTPUT, if hasattr(model, "hparams"): parsing.clean_namespace(model.hparams) - self.config_validator.verify_loop_configurations(model) + self._config_validator.verify_loop_configurations(model) # attach model log function to callback self.callback_connector.attach_model_logging_functions(model) From ef29d661b116794943c97b054eac2587e2a98096 Mon Sep 17 00:00:00 2001 From: ananthsub Date: Thu, 30 Sep 2021 22:41:31 -0700 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 774064191714b..4123abc780f38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -243,6 +243,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - Changed `HorovodPlugin.all_gather` to return a `torch.Tensor` instead of a list ([#9696](https://github.com/PyTorchLightning/pytorch-lightning/pull/9696)) +- Changed Trainer connectors to be protected attributes: + * Configuration Validator ([#9779](https://github.com/PyTorchLightning/pytorch-lightning/pull/9779)) + + ### Deprecated - Deprecated `LightningModule.summarize()` in favor of `pytorch_lightning.utilities.model_summary.summarize()`