From ed295e74dc43055bcf1f32d0de301d9b228dadfa Mon Sep 17 00:00:00 2001 From: chenyu Date: Fri, 9 Jan 2026 12:05:58 -0500 Subject: [PATCH] don't skip gguf test if ggml is not installed (#14086) * don't skip gguf test if ggml is not installed should just let it fail * fix --- pyproject.toml | 3 +-- test/unit/test_gguf.py | 7 ++----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index f8b3d952aa..3a7482d494 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -69,7 +69,7 @@ testing_minimal = [ "hypothesis>=6.148.9", "z3-solver", ] -testing_unit = ["tinygrad[testing_minimal]", "tqdm", "safetensors", "tabulate", "openai"] +testing_unit = ["tinygrad[testing_minimal]", "tqdm", "safetensors", "tabulate", "openai", "ggml-python"] testing = [ "tinygrad[testing_unit]", "pillow", @@ -87,7 +87,6 @@ testing = [ "networkx", "nibabel", "bottle", - "ggml-python", "capstone", "pycocotools", "boto3", diff --git a/test/unit/test_gguf.py b/test/unit/test_gguf.py index 9c68e680d9..4cdff86581 100644 --- a/test/unit/test_gguf.py +++ b/test/unit/test_gguf.py @@ -1,12 +1,9 @@ import os, unittest, ctypes from tinygrad import dtypes, Tensor, fetch, Device -import numpy as np from tinygrad.nn.state import ggml_data_to_tensor, gguf_load from tinygrad.device import is_dtype_supported -try: - import ggml -except ModuleNotFoundError: - raise unittest.SkipTest("ggml not installed, skipping gguf test") +import numpy as np +import ggml ggml_test_block_count = 4 ggml_type_to_np_dtype = {