set default for merge (#1044)

This commit is contained in:
Hamel Husain
2024-01-04 18:14:20 -08:00
committed by GitHub
parent 31d23504a5
commit 63fb3eb426
2 changed files with 10 additions and 3 deletions

View File

@@ -25,9 +25,16 @@ def do_cli(config: Path = Path("examples/"), **kwargs):
load_in_8bit=False,
load_in_4bit=False,
flash_attention=False,
**kwargs
**kwargs,
)
if not parsed_cfg.lora_model_dir and parsed_cfg.output_dir:
parsed_cfg.lora_model_dir = parsed_cfg.output_dir
if not Path(parsed_cfg.lora_model_dir).exists():
raise ValueError(
f"Target directory for merge: `{parsed_cfg.lora_model_dir}` does not exist."
)
do_merge_lora(cfg=parsed_cfg, cli_args=parsed_cli_args)