@@ -20,23 +20,23 @@ def read_gguf_file(gguf_file_path):
20
20
reader = GGUFReader (gguf_file_path )
21
21
22
22
# List all key-value pairs in a columnized format
23
- logger . info ("Key-Value Pairs:" )
23
+ print ("Key-Value Pairs:" ) # noqa: NP100
24
24
max_key_length = max (len (key ) for key in reader .fields .keys ())
25
25
for key , field in reader .fields .items ():
26
26
value = field .parts [field .data [0 ]]
27
- logger . info (f"{ key :{max_key_length }} : { value } " )
28
- logger . info ("----" )
27
+ print (f"{ key :{max_key_length }} : { value } " ) # noqa: NP100
28
+ print ("----" ) # noqa: NP100
29
29
30
30
# List all tensors
31
- logger . info ("Tensors:" )
31
+ print ("Tensors:" ) # noqa: NP100
32
32
tensor_info_format = "{:<30} | Shape: {:<15} | Size: {:<12} | Quantization: {}"
33
- logger . info (tensor_info_format .format ("Tensor Name" , "Shape" , "Size" , "Quantization" ))
34
- logger . info ("-" * 80 )
33
+ print (tensor_info_format .format ("Tensor Name" , "Shape" , "Size" , "Quantization" )) # noqa: NP100
34
+ print ("-" * 80 ) # noqa: NP100
35
35
for tensor in reader .tensors :
36
36
shape_str = "x" .join (map (str , tensor .shape ))
37
37
size_str = str (tensor .n_elements )
38
38
quantization_str = tensor .tensor_type .name
39
- logger . info (tensor_info_format .format (tensor .name , shape_str , size_str , quantization_str ))
39
+ print (tensor_info_format .format (tensor .name , shape_str , size_str , quantization_str )) # noqa: NP100
40
40
41
41
42
42
if __name__ == '__main__' :
0 commit comments