From 3ec89dcc6911b21bf71e0a6667350c79dc680794 Mon Sep 17 00:00:00 2001 From: Galunid Date: Tue, 31 Oct 2023 22:23:26 +0100 Subject: [PATCH] Use 'IntEnum' instead of 'Enum' --- model.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/model.py b/model.py index df16de531..97e3b6638 100644 --- a/model.py +++ b/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