gguf-py : use snake_case in scripts entrypoint export

This commit is contained in:
Francis Couture-Harpin 2024-07-04 16:08:15 -04:00
parent 3e3cc7102f
commit 902de8826b
3 changed files with 6 additions and 15 deletions

View File

@ -1,7 +1,7 @@
# Usage: # Usage:
#! ./llama-server -m some-model.gguf & #! ./llama-server -m some-model.gguf &
#! pip install pydantic #! pip install pydantic
#! python json-schema-pydantic-example.py #! python json_schema_pydantic_example.py
from pydantic import BaseModel, Extra, TypeAdapter from pydantic import BaseModel, Extra, TypeAdapter
from annotated_types import MinLen from annotated_types import MinLen

View File

@ -1,13 +1,4 @@
import os from .gguf_convert_endian import main as gguf_convert_endian_entrypoint
from .gguf_dump import main as gguf_dump_entrypoint
from importlib import import_module from .gguf_set_metadata import main as gguf_set_metadata_entrypoint
from .gguf_new_metadata import main as gguf_new_metadata_entrypoint
os.environ["NO_LOCAL_GGUF"] = "TRUE"
gguf_convert_endian_entrypoint = import_module("scripts.gguf-convert-endian").main
gguf_dump_entrypoint = import_module("scripts.gguf-dump").main
gguf_set_metadata_entrypoint = import_module("scripts.gguf-set-metadata").main
gguf_new_metadata_entrypoint = import_module("scripts.gguf-new-metadata").main
del import_module, os

View File

@ -97,7 +97,7 @@ check_requirements() {
} }
check_convert_script() { check_convert_script() {
local py=$1 # e.g. convert_hf_to_gguf.py local py=$1 # e.g. ./convert_hf_to_gguf.py
local pyname=${py##*/} # e.g. convert_hf_to_gguf.py local pyname=${py##*/} # e.g. convert_hf_to_gguf.py
pyname=${pyname%.py} # e.g. convert_hf_to_gguf pyname=${pyname%.py} # e.g. convert_hf_to_gguf