Skip to content

Commit

Permalink
Mark trainer.config_validator as protected (#9779)
Browse files Browse the repository at this point in the history
  • Loading branch information
ananthsub authored Oct 12, 2021
1 parent db322f4 commit f16bfe9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,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))


- Restore `current_epoch` and `global_step` irrespective of trainer task ([#9413](https://github.com/PyTorchLightning/pytorch-lightning/pull/9413))


Expand Down
4 changes: 2 additions & 2 deletions pytorch_lightning/trainer/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,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)

Expand Down Expand Up @@ -992,7 +992,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)
Expand Down

0 comments on commit f16bfe9

Please sign in to comment.