Skip to content

Commit c19a398

Browse files
Comments
1 parent 01656d1 commit c19a398

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/nncf/parameters.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
# limitations under the License.
1111

1212
from enum import Enum
13+
from typing import Any
1314

1415
from nncf.common.utils.api_marker import api
1516

@@ -18,6 +19,10 @@ class StrEnum(str, Enum):
1819
def __str__(self) -> str:
1920
return str(self.value)
2021

22+
@staticmethod
23+
def _generate_next_value_(name: str, start: int, count: int, last_values: list[Any]) -> Any:
24+
return name.lower()
25+
2126

2227
@api(canonical_alias="nncf.TargetDevice")
2328
class TargetDevice(StrEnum):

src/nncf/tensor/definitions.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from dataclasses import dataclass
1313
from enum import Enum
1414
from enum import auto
15-
from typing import Any, Optional, Union
15+
from typing import Optional, Union
1616

1717
from nncf.parameters import StrEnum
1818

@@ -38,10 +38,6 @@ class TensorDataType(StrEnum):
3838
Enum representing the different tensor data types.
3939
"""
4040

41-
@staticmethod
42-
def _generate_next_value_(name: str, start: int, count: int, last_values: list[Any]) -> Any:
43-
return name.lower()
44-
4541
float16 = auto()
4642
bfloat16 = auto()
4743
float32 = auto()

0 commit comments

Comments
 (0)