switch to namedtuple, no need to dataclass
This commit is contained in:
parent
e5956f5bbe
commit
ff5d21e608
1 changed files with 2 additions and 4 deletions
|
@ -7,8 +7,7 @@ import json
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from typing import Any, Mapping, Sequence
|
from typing import Any, Mapping, Sequence, NamedTuple
|
||||||
from dataclasses import dataclass
|
|
||||||
|
|
||||||
# Necessary to load the local gguf package
|
# Necessary to load the local gguf package
|
||||||
if "NO_LOCAL_GGUF" not in os.environ and (Path(__file__).parent.parent.parent / 'gguf-py').exists():
|
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")
|
logger = logging.getLogger("gguf-new-metadata")
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
class MetadataDetails(NamedTuple):
|
||||||
class MetadataDetails:
|
|
||||||
type: gguf.GGUFValueType
|
type: gguf.GGUFValueType
|
||||||
value: Any
|
value: Any
|
||||||
description: str = ''
|
description: str = ''
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue