switch to namedtuple, no need to dataclass

This commit is contained in:
Sigbjørn Skjæret 2024-04-21 11:43:43 +02:00
parent bc92f65e8c
commit 87e2d7354f

View file

@ -7,8 +7,7 @@ import json
from pathlib import Path
import numpy as np
from typing import Any, Sequence
from dataclasses import dataclass
from typing import Any, Sequence, NamedTuple
# Necessary to load the local gguf package
if "NO_LOCAL_GGUF" not in os.environ and (Path(__file__).parent.parent.parent / 'gguf-py').exists():
@ -19,8 +18,7 @@ import gguf
logger = logging.getLogger("gguf-new-metadata")
@dataclass
class MetadataDetails:
class MetadataDetails(NamedTuple):
type: gguf.GGUFValueType
value: Any
description: str = ''