*.py: refactor logging.basicConfig()
This commit is contained in:
parent
1b7c80072b
commit
b0b51e7874
2 changed files with 2 additions and 8 deletions
|
@ -408,10 +408,7 @@ def handle_args():
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
cfg = handle_args()
|
cfg = handle_args()
|
||||||
if cfg.verbose:
|
logging.basicConfig(level=logging.DEBUG if cfg.verbose else logging.INFO)
|
||||||
logging.basicConfig(level=logging.DEBUG)
|
|
||||||
else:
|
|
||||||
logging.basicConfig(level=logging.INFO)
|
|
||||||
logger.info(f'* Using config: {cfg}')
|
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 ===')
|
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'):
|
if cfg.model_metadata_dir is None and (cfg.gqa == 1 or cfg.eps == '5.0e-06'):
|
||||||
|
|
|
@ -67,10 +67,7 @@ if not known_args.yaml_files and not unknown_args:
|
||||||
parser.print_help()
|
parser.print_help()
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
if known_args.verbose:
|
logging.basicConfig(level=logging.DEBUG if known_args.verbose else logging.INFO)
|
||||||
logging.basicConfig(level=logging.DEBUG)
|
|
||||||
else:
|
|
||||||
logging.basicConfig(level=logging.INFO)
|
|
||||||
|
|
||||||
props = dict()
|
props = dict()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue