Skip to content

Commit d74613e

Browse files
committed
constant.py: logger.error then exit should be a raise exception instead
1 parent 3d98dc7 commit d74613e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

gguf-py/gguf/constants.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from __future__ import annotations
22

33
import logging
4-
import sys
54
from enum import Enum, IntEnum, auto
65
from typing import Any
76

@@ -789,8 +788,7 @@ def get_type(val: Any) -> GGUFValueType:
789788
return GGUFValueType.INT32
790789
# TODO: need help with 64-bit types in Python
791790
else:
792-
logger.error(f"Unknown type: {type(val)}")
793-
sys.exit()
791+
raise ValueError(f"Unknown type: {type(val)}")
794792

795793

796794
# Note: Does not support GGML_QKK_64

0 commit comments

Comments
 (0)