]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
py: add_array() will not add to kv store if value is an empty array (#8774)
authorBrian <redacted>
Tue, 30 Jul 2024 14:57:03 +0000 (00:57 +1000)
committerGitHub <redacted>
Tue, 30 Jul 2024 14:57:03 +0000 (00:57 +1000)
commit7e72aa74fd676a093eb9970e761085ec22734c71
tree0beb0be212ece008945b5530cb27e56d4037089a
parent7c27a19b2eb91bb0f43c7f7aec0386cec2dddc33
py: add_array() will not add to kv store if value is an empty array (#8774)

* gguf_writer.py: add_array() should not add to kv store if empty

* Apply suggestions from code review

I was wondering if there was a specific reason for `if val` but good to hear we can safely use `len(val == 0`

Co-authored-by: compilade <redacted>
---------

Co-authored-by: compilade <redacted>
gguf-py/gguf/gguf_writer.py