From f22d8f9ca49681e1ca52c9bdedfe3b5c5a3409b8 Mon Sep 17 00:00:00 2001 From: hiyouga <467089858@qq.com> Date: Wed, 19 Jun 2024 23:46:03 +0800 Subject: [PATCH] improve llamaboard --- src/llamafactory/webui/components/top.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/llamafactory/webui/components/top.py b/src/llamafactory/webui/components/top.py index 2515a83d..09d43ac8 100644 --- a/src/llamafactory/webui/components/top.py +++ b/src/llamafactory/webui/components/top.py @@ -50,9 +50,13 @@ def create_top() -> Dict[str, "Component"]: visual_inputs = gr.Checkbox(scale=1) model_name.change(get_model_info, [model_name], [model_path, template, visual_inputs], queue=False) - model_name.input(save_config, inputs=[lang, model_name], queue=False) + model_name.input(save_config, inputs=[lang, model_name], queue=False).then( + list_checkpoints, [model_name, finetuning_type], [checkpoint_path], queue=False + ) model_path.input(save_config, inputs=[lang, model_name, model_path], queue=False) - finetuning_type.change(can_quantize, [finetuning_type], [quantization_bit], queue=False) + finetuning_type.change(can_quantize, [finetuning_type], [quantization_bit], queue=False).then( + list_checkpoints, [model_name, finetuning_type], [checkpoint_path], queue=False + ) checkpoint_path.focus(list_checkpoints, [model_name, finetuning_type], [checkpoint_path], queue=False) return dict(