mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-12-29 10:10:35 +08:00
add tool hint
Former-commit-id: 64734ffe2f45f80a1e33c2a72330b2ab1e58feb3
This commit is contained in:
@@ -41,6 +41,13 @@ def can_quantize(finetuning_type: str) -> Dict[str, Any]:
|
||||
return gr.update(interactive=True)
|
||||
|
||||
|
||||
def check_json_schema(text: str) -> None:
|
||||
try:
|
||||
json.loads(text)
|
||||
except json.JSONDecodeError:
|
||||
gr.Warning("Invalid JSON schema")
|
||||
|
||||
|
||||
def gen_cmd(args: Dict[str, Any]) -> str:
|
||||
args.pop("disable_tqdm", None)
|
||||
args["plot_loss"] = args.get("do_train", None)
|
||||
|
||||
Reference in New Issue
Block a user