diff --git a/convert-llama-ggml-to-gguf.py b/convert-llama-ggml-to-gguf.py index 5496a50ef..97e6ff853 100755 --- a/convert-llama-ggml-to-gguf.py +++ b/convert-llama-ggml-to-gguf.py @@ -408,10 +408,7 @@ def handle_args(): def main(): cfg = handle_args() - if cfg.verbose: - logging.basicConfig(level=logging.DEBUG) - else: - logging.basicConfig(level=logging.INFO) + logging.basicConfig(level=logging.DEBUG if cfg.verbose else logging.INFO) logger.info(f'* Using config: {cfg}') logger.warning('=== WARNING === Be aware that this conversion script is best-effort. Use a native GGUF model if possible. === WARNING ===') if cfg.model_metadata_dir is None and (cfg.gqa == 1 or cfg.eps == '5.0e-06'): diff --git a/scripts/run-with-preset.py b/scripts/run-with-preset.py index fe84cbc7c..3c62c557f 100755 --- a/scripts/run-with-preset.py +++ b/scripts/run-with-preset.py @@ -67,10 +67,7 @@ if not known_args.yaml_files and not unknown_args: parser.print_help() sys.exit(0) -if known_args.verbose: - logging.basicConfig(level=logging.DEBUG) -else: - logging.basicConfig(level=logging.INFO) +logging.basicConfig(level=logging.DEBUG if known_args.verbose else logging.INFO) props = dict()