support save args in webui #2807 #3046

some ideas are borrowed from @marko1616


Former-commit-id: b5a062aa2d4a37670007e8b3dae5b6f5b7ffb15c
This commit is contained in:
hiyouga
2024-03-30 23:09:12 +08:00
parent b0efebf853
commit 6198121923
9 changed files with 219 additions and 80 deletions

View File

@@ -38,8 +38,9 @@ class Engine:
if not self.pure_chat:
init_dict["train.dataset"] = {"choices": list_dataset().choices}
init_dict["eval.dataset"] = {"choices": list_dataset().choices}
init_dict["train.output_dir"] = {"value": "train_" + get_time()}
init_dict["eval.output_dir"] = {"value": "eval_" + get_time()}
init_dict["train.output_dir"] = {"value": "train_{}".format(get_time())}
init_dict["train.config_path"] = {"value": "{}.json".format(get_time())}
init_dict["eval.output_dir"] = {"value": "eval_{}".format(get_time())}
if user_config.get("last_model", None):
init_dict["top.model_name"] = {"value": user_config["last_model"]}