Use 'IntEnum' instead of 'Enum'
This commit is contained in:
parent
f4b9a7ea02
commit
3ec89dcc69
1 changed files with 2 additions and 2 deletions
4
model.py
4
model.py
|
@ -7,14 +7,14 @@ import torch
|
|||
import contextlib
|
||||
import numpy as np
|
||||
|
||||
from enum import Enum
|
||||
from enum import IntEnum
|
||||
from pathlib import Path
|
||||
from typing import TypeAlias, Any, Generator
|
||||
|
||||
NDArray: TypeAlias = 'np.ndarray[Any, Any]'
|
||||
|
||||
|
||||
class SentencePieceTokenTypes(Enum):
|
||||
class SentencePieceTokenTypes(IntEnum):
|
||||
NORMAL = 1
|
||||
UNKNOWN = 2
|
||||
CONTROL = 3
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue