2020-03-06 17:00:05 +00:00
|
|
|
"""Mirroring deprecated API"""
|
|
|
|
|
|
|
|
from abc import ABC
|
|
|
|
|
2020-04-09 18:05:46 +00:00
|
|
|
from pytorch_lightning.utilities import rank_zero_warn
|
|
|
|
|
2020-03-06 17:00:05 +00:00
|
|
|
|
2020-04-02 22:53:00 +00:00
|
|
|
class TrainerDeprecatedAPITillVer0_9(ABC):
|
2020-06-12 18:37:52 +00:00
|
|
|
progress_bar_dict: ...
|
|
|
|
progress_bar_callback: ...
|
2020-04-02 22:53:00 +00:00
|
|
|
|
|
|
|
def __init__(self):
|
|
|
|
super().__init__() # mixin calls super too
|
|
|
|
|
|
|
|
@property
|
|
|
|
def show_progress_bar(self):
|
|
|
|
"""Back compatibility, will be removed in v0.9.0"""
|
2020-04-09 18:05:46 +00:00
|
|
|
rank_zero_warn("Argument `show_progress_bar` is now set by `progress_bar_refresh_rate` since v0.7.2"
|
|
|
|
" and this method will be removed in v0.9.0", DeprecationWarning)
|
2020-05-25 11:49:23 +00:00
|
|
|
return self.progress_bar_callback and self.progress_bar_callback.refresh_rate >= 1
|
2020-04-02 22:53:00 +00:00
|
|
|
|
|
|
|
@show_progress_bar.setter
|
|
|
|
def show_progress_bar(self, tf):
|
|
|
|
"""Back compatibility, will be removed in v0.9.0"""
|
2020-04-09 18:05:46 +00:00
|
|
|
rank_zero_warn("Argument `show_progress_bar` is now set by `progress_bar_refresh_rate` since v0.7.2"
|
|
|
|
" and this method will be removed in v0.9.0", DeprecationWarning)
|
2020-04-24 00:46:18 +00:00
|
|
|
|
|
|
|
@property
|
|
|
|
def training_tqdm_dict(self):
|
|
|
|
"""Back compatibility, will be removed in v0.9.0"""
|
|
|
|
rank_zero_warn("`training_tqdm_dict` was renamed to `progress_bar_dict` in v0.7.3"
|
|
|
|
" and this method will be removed in v0.9.0", DeprecationWarning)
|
|
|
|
return self.progress_bar_dict
|
2020-05-17 20:30:54 +00:00
|
|
|
|
|
|
|
@property
|
|
|
|
def num_tpu_cores(self):
|
|
|
|
"""Back compatibility, will be removed in v0.9.0"""
|
|
|
|
rank_zero_warn("Argument `num_tpu_cores` is now set by `tpu_cores` since v0.7.6"
|
|
|
|
" and this argument will be removed in v0.9.0", DeprecationWarning)
|