Remove unnecessary NotImplementedError used in Training Type Plugin (#10235)

Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
This commit is contained in:
Kaushik B 2021-11-01 22:23:46 +05:30 committed by GitHub
parent b77aa718de
commit f5609be40a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 5 deletions

View File

@ -44,7 +44,7 @@ class ParallelPlugin(TrainingTypePlugin, ABC):
@property
@abstractmethod
def root_device(self) -> torch.device:
raise NotImplementedError
"""Return the root device."""
@property
def on_gpu(self) -> bool:

View File

@ -86,19 +86,16 @@ class TrainingTypePlugin(ABC):
@abstractmethod
def on_gpu(self) -> bool:
"""Returns whether the current process is done on GPU."""
raise NotImplementedError
@property
@abstractmethod
def on_tpu(self) -> bool:
"""Returns whether the current process is done on TPU."""
raise NotImplementedError
@property
@abstractmethod
def root_device(self) -> torch.device:
"""Returns the root device."""
raise NotImplementedError
@abstractmethod
def model_to_device(self) -> None:
@ -321,7 +318,6 @@ class TrainingTypePlugin(ABC):
It is the right place to release memory and free other resources.
"""
raise NotImplementedError
@classmethod
def register_plugins(cls, plugin_registry) -> None: