Skip to content

Commit f16bfe9

Browse files
authored
Mark trainer.config_validator as protected (#9779)
1 parent db322f4 commit f16bfe9

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
@@ -404,7 +404,7 @@ def __init__(
404404
gpu_ids, tpu_cores = self._parse_devices(gpus, auto_select_gpus, tpu_cores)
405405

406406
# init connectors
407-
self.config_validator = ConfigValidator(self)
407+
self._config_validator = ConfigValidator(self)
408408
self.data_connector = DataConnector(self, multiple_trainloader_mode)
409409
self.optimizer_connector = OptimizerConnector(self)
410410

@@ -992,7 +992,7 @@ def _run(self, model: "pl.LightningModule") -> Optional[Union[_EVALUATE_OUTPUT,
992992
if hasattr(model, "hparams"):
993993
parsing.clean_namespace(model.hparams)
994994

995-
self.config_validator.verify_loop_configurations(model)
995+
self._config_validator.verify_loop_configurations(model)
996996

997997
# attach model log function to callback
998998
self.callback_connector.attach_model_logging_functions(model)

0 commit comments

Comments
 (0)