Skip to content

Commit

Permalink
deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda committed Jun 19, 2020
1 parent b2dd1a3 commit 297c4f6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
* `test_percent_check` in favour of `limit_test_batches`
- Deprecated `ModelCheckpoint`'s attributes `best` and `kth_best_model` ([#1799](https://github.com/PyTorchLightning/pytorch-lightning/pull/1799))
- Dropped official support/testing for older PyTorch versions <1.3 ([#1917](https://github.com/PyTorchLightning/pytorch-lightning/pull/1917))
- Deprecated Trainer `proc_rank` in favour of `global_rank` ([#2166](https://github.com/PyTorchLightning/pytorch-lightning/pull/2166), )

### Removed

Expand Down
14 changes: 14 additions & 0 deletions pytorch_lightning/trainer/deprecated_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,17 @@ def overfit_pct(self, pct):
rank_zero_warn("Attribute `train_percent_check` is now set by `overfit_batches` since v0.8.0"
" and this method will be removed in v0.10.0", DeprecationWarning)
self.overfit_batches = pct

@property
def proc_rank(self) -> int:
"""Back compatibility, will be removed in v0.10.0"""
rank_zero_warn("Attribute `proc_rank` is now set by `global_rank` since v0.8.0"
" and this method will be removed in v0.10.0", DeprecationWarning)
return self.global_rank

@proc_rank.setter
def proc_rank(self, rank):
"""Back compatibility, will be removed in v0.10.0"""
rank_zero_warn("Attribute `proc_rank` is now set by `global_rank` since v0.8.0"
" and this method will be removed in v0.10.0", DeprecationWarning)
self.global_rank = rank

0 comments on commit 297c4f6

Please sign in to comment.