AbstractPhil commited on
Commit
6f5892c
·
verified ·
1 Parent(s): 26604c3

fix: arm dropdown allow_custom_value — gradio validated submitted values against BOOT-TIME choices, so any arm from a non-default checkpoint was rejected server-side; this app validates paths itself (unknown/cross-core -> core-only)

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -738,8 +738,15 @@ with gr.Blocks(title="Beatrix — AlephLLM chat") as demo:
738
  with gr.Row():
739
  ckpt = gr.Dropdown([(_label(s), s) for s in STEPS], value=STEP,
740
  label="Checkpoint", scale=3)
 
 
 
 
 
 
741
  arm_pick = gr.Dropdown(arm_choices(STEP), value=default_arm(STEP),
742
- label="Arm (adapter)", scale=4)
 
743
  with gr.Row():
744
  max_new = gr.Slider(16, MAX_NEW_CAP, value=192, step=16,
745
  label="Max new bytes")
 
738
  with gr.Row():
739
  ckpt = gr.Dropdown([(_label(s), s) for s in STEPS], value=STEP,
740
  label="Checkpoint", scale=3)
741
+ # allow_custom_value: the choice list is repopulated per
742
+ # checkpoint, but gradio validates a submitted value against the
743
+ # component's BOOT-TIME choices — without this, picking any arm
744
+ # from another checkpoint is rejected server-side ("not in the
745
+ # list of choices"). Values are validated by this app instead:
746
+ # unknown or cross-core paths fall back to core-only in _select.
747
  arm_pick = gr.Dropdown(arm_choices(STEP), value=default_arm(STEP),
748
+ label="Arm (adapter)", scale=4,
749
+ allow_custom_value=True)
750
  with gr.Row():
751
  max_new = gr.Slider(16, MAX_NEW_CAP, value=192, step=16,
752
  label="Max new bytes")