Skip to content

Commit b0b51e7

Browse files
committed
*.py: refactor logging.basicConfig()
1 parent 1b7c800 commit b0b51e7

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

convert-llama-ggml-to-gguf.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -408,10 +408,7 @@ def handle_args():
408408

409409
def main():
410410
cfg = handle_args()
411-
if cfg.verbose:
412-
logging.basicConfig(level=logging.DEBUG)
413-
else:
414-
logging.basicConfig(level=logging.INFO)
411+
logging.basicConfig(level=logging.DEBUG if cfg.verbose else logging.INFO)
415412
logger.info(f'* Using config: {cfg}')
416413
logger.warning('=== WARNING === Be aware that this conversion script is best-effort. Use a native GGUF model if possible. === WARNING ===')
417414
if cfg.model_metadata_dir is None and (cfg.gqa == 1 or cfg.eps == '5.0e-06'):

scripts/run-with-preset.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,7 @@
6767
parser.print_help()
6868
sys.exit(0)
6969

70-
if known_args.verbose:
71-
logging.basicConfig(level=logging.DEBUG)
72-
else:
73-
logging.basicConfig(level=logging.INFO)
70+
logging.basicConfig(level=logging.DEBUG if known_args.verbose else logging.INFO)
7471

7572
props = dict()
7673

0 commit comments

Comments
 (0)