Skip to content

Commit 40106cf

Browse files
ananthsubrohitgr7
authored andcommitted
Mark trainer.config_validator as protected (Lightning-AI#9779)
1 parent e974572 commit 40106cf

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
257257
- Changed `HorovodPlugin.all_gather` to return a `torch.Tensor` instead of a list ([#9696](https://github.com/PyTorchLightning/pytorch-lightning/pull/9696))
258258

259259

260+
- Changed Trainer connectors to be protected attributes:
261+
* Configuration Validator ([#9779](https://github.com/PyTorchLightning/pytorch-lightning/pull/9779))
262+
263+
260264
- Restore `current_epoch` and `global_step` irrespective of trainer task ([#9413](https://github.com/PyTorchLightning/pytorch-lightning/pull/9413))
261265

262266

pytorch_lightning/trainer/trainer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ def __init__(
401401
gpu_ids, tpu_cores = self._parse_devices(gpus, auto_select_gpus, tpu_cores)
402402

403403
# init connectors
404-
self.config_validator = ConfigValidator(self)
404+
self._config_validator = ConfigValidator(self)
405405
self.data_connector = DataConnector(self, multiple_trainloader_mode)
406406
self.optimizer_connector = OptimizerConnector(self)
407407

@@ -988,7 +988,7 @@ def _run(self, model: "pl.LightningModule") -> Optional[Union[_EVALUATE_OUTPUT,
988988
if hasattr(model, "hparams"):
989989
parsing.clean_namespace(model.hparams)
990990

991-
self.config_validator.verify_loop_configurations(model)
991+
self._config_validator.verify_loop_configurations(model)
992992

993993
# attach model log function to callback
994994
self.callback_connector.attach_model_logging_functions(model)

0 commit comments

Comments
 (0)