refactor: Add fixes for logging
This commit is contained in:
parent
77bc7394c8
commit
c91dcdf2a4
1 changed files with 6 additions and 1 deletions
|
@ -18,7 +18,7 @@ if (
|
||||||
from gguf.constants import MODEL_ARCH, MODEL_ARCH_NAMES
|
from gguf.constants import MODEL_ARCH, MODEL_ARCH_NAMES
|
||||||
from gguf.huggingface_hub import HFVocabRequest
|
from gguf.huggingface_hub import HFVocabRequest
|
||||||
|
|
||||||
logger = logging.getLogger("gguf-gen-pre")
|
logger = logging.getLogger(Path(__file__).stem)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
@ -45,6 +45,11 @@ def main():
|
||||||
)
|
)
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
if args.verbose:
|
||||||
|
logging.basicConfig(level=logging.DEBUG)
|
||||||
|
else:
|
||||||
|
logging.basicConfig(level=logging.INFO)
|
||||||
|
|
||||||
vocab_request = HFVocabRequest(args.auth_token, args.model_path, logger)
|
vocab_request = HFVocabRequest(args.auth_token, args.model_path, logger)
|
||||||
vocab_type = vocab_request.get_vocab_enum(args.vocab_type)
|
vocab_type = vocab_request.get_vocab_enum(args.vocab_type)
|
||||||
vocab_request.get_all_vocab_files(args.model_repo, vocab_type)
|
vocab_request.get_all_vocab_files(args.model_repo, vocab_type)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue