Update tuner.py
This commit is contained in:
parent
b5ef993e34
commit
ddd48ce8ab
|
@ -40,6 +40,9 @@ def run_exp(args: Optional[Dict[str, Any]] = None, callbacks: Optional[List["Tra
|
||||||
def export_model(args: Optional[Dict[str, Any]] = None):
|
def export_model(args: Optional[Dict[str, Any]] = None):
|
||||||
model_args, _, finetuning_args, _ = get_infer_args(args)
|
model_args, _, finetuning_args, _ = get_infer_args(args)
|
||||||
|
|
||||||
|
if model_args.export_dir is None:
|
||||||
|
raise ValueError("Please specify `export_dir`.")
|
||||||
|
|
||||||
if model_args.adapter_name_or_path is not None and model_args.export_quantization_bit is not None:
|
if model_args.adapter_name_or_path is not None and model_args.export_quantization_bit is not None:
|
||||||
raise ValueError("Please merge adapters before quantizing the model.")
|
raise ValueError("Please merge adapters before quantizing the model.")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue