fix badam configs

This commit is contained in:
hiyouga
2024-05-02 02:47:04 +08:00
parent f1c0eedeb3
commit 9433c8c215
5 changed files with 44 additions and 69 deletions

View File

@@ -215,17 +215,17 @@ def create_train_tab(engine: "Engine") -> Dict[str, "Component"]:
use_badam = gr.Checkbox()
badam_mode = gr.Dropdown(choices=["layer", "ratio"], value="layer")
badam_switch_mode = gr.Dropdown(choices=["ascending", "descending", "random", "fixed"], value="ascending")
badam_switch_block_every = gr.Slider(value=50, minimum=-1, maximum=200, step=1)
badam_update_ratio = gr.Slider(value=0, minimum=0, maximum=1, step=0.01)
badam_switch_interval = gr.Slider(value=50, minimum=1, maximum=1024, step=1)
badam_update_ratio = gr.Slider(value=0.05, minimum=0, maximum=1, step=0.01)
input_elems.update({use_badam, badam_mode, badam_switch_mode, badam_switch_block_every, badam_update_ratio})
input_elems.update({use_badam, badam_mode, badam_switch_mode, badam_switch_interval, badam_update_ratio})
elem_dict.update(
dict(
badam_tab=badam_tab,
use_badam=use_badam,
badam_mode=badam_mode,
badam_switch_mode=badam_switch_mode,
badam_switch_block_every=badam_switch_block_every,
badam_switch_interval=badam_switch_interval,
badam_update_ratio=badam_update_ratio,
)
)