Skip to content

Commit ecb2081

Browse files
committed
rename
1 parent 52225ae commit ecb2081

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pytorch_lightning/utilities/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ def _module_available(module_path: str) -> bool:
6161
FLOAT64_EPSILON = numpy.finfo(numpy.float64).eps
6262

6363

64-
class LightningType(str, Enum):
64+
class LightningEnum(str, Enum):
6565
""" Type of any enumerator with allowed comparison to string invariant to cases. """
6666

6767
@classmethod
68-
def from_str(cls, value: str) -> 'LightningType':
68+
def from_str(cls, value: str) -> 'LightningEnum':
6969
statuses = [status for status in dir(cls) if not status.startswith('_')]
7070
for st in statuses:
7171
if st.lower() == value.lower():
@@ -77,7 +77,7 @@ def __eq__(self, other: Union[str, Enum]) -> bool:
7777
return self.value.lower() == other.lower()
7878

7979

80-
class AMPType(LightningType):
80+
class AMPType(LightningEnum):
8181
"""Type of Automatic Mixed Precission used for training.
8282
8383
>>> # you can math the type with string
@@ -88,7 +88,7 @@ class AMPType(LightningType):
8888
NATIVE = 'native'
8989

9090

91-
class DistributedType(LightningType):
91+
class DistributedType(LightningEnum):
9292
""" Define type of ditributed computing.
9393
9494
>>> # you can math the type with string
@@ -105,7 +105,7 @@ class DistributedType(LightningType):
105105
HOROVOD = 'horovod'
106106

107107

108-
class DeviceType(LightningType):
108+
class DeviceType(LightningEnum):
109109
""" Define Device type byt its nature - acceleatrors.
110110
111111
>>> DeviceType.CPU == DeviceType.from_str('cpu')

0 commit comments

Comments
 (0)