From cf38b4b8313d5a9a1358951eff7e32d3087dca83 Mon Sep 17 00:00:00 2001 From: brian khuu Date: Thu, 18 Apr 2024 11:10:57 +1000 Subject: [PATCH] constant.py: logger.error then exit should be a raise exception instead --- gguf-py/gguf/constants.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gguf-py/gguf/constants.py b/gguf-py/gguf/constants.py index 831a2c515..3725031e7 100644 --- a/gguf-py/gguf/constants.py +++ b/gguf-py/gguf/constants.py @@ -1,7 +1,6 @@ from __future__ import annotations import logging -import sys from enum import Enum, IntEnum, auto from typing import Any @@ -857,8 +856,7 @@ class GGUFValueType(IntEnum): return GGUFValueType.INT32 # TODO: need help with 64-bit types in Python else: - logger.error(f"Unknown type: {type(val)}") - sys.exit() + raise ValueError(f"Unknown type: {type(val)}") # Note: Does not support GGML_QKK_64