inoki-giskard commited on
Commit
1b0298e
1 Parent(s): b8e1457

Add verbose mode checkbox and append verbose arg

Browse files
app_text_classification.py CHANGED
@@ -123,6 +123,9 @@ def get_demo():
123
  )
124
 
125
  with gr.Accordion(label="Scanner Advanced Config (optional)", open=False):
 
 
 
126
  scanners = gr.CheckboxGroup(visible=True)
127
 
128
  @gr.on(triggers=[uid_label.change], inputs=[uid_label], outputs=[scanners])
@@ -277,6 +280,7 @@ def get_demo():
277
  dataset_split_input,
278
  inference_token,
279
  uid_label,
 
280
  ],
281
  outputs=[
282
  run_btn,
 
123
  )
124
 
125
  with gr.Accordion(label="Scanner Advanced Config (optional)", open=False):
126
+ with gr.Group():
127
+ verbose_mode_checkbox = gr.Checkbox(label="Verbose mode")
128
+
129
  scanners = gr.CheckboxGroup(visible=True)
130
 
131
  @gr.on(triggers=[uid_label.change], inputs=[uid_label], outputs=[scanners])
 
280
  dataset_split_input,
281
  inference_token,
282
  uid_label,
283
+ verbose_mode_checkbox,
284
  ],
285
  outputs=[
286
  run_btn,
run_jobs.py CHANGED
@@ -54,6 +54,7 @@ def prepare_env_and_get_command(
54
  uid,
55
  label_mapping,
56
  feature_mapping,
 
57
  ):
58
  leaderboard_dataset = None
59
  if os.environ.get("SPACE_ID") == "giskardai/giskard-evaluator":
@@ -127,6 +128,9 @@ def prepare_env_and_get_command(
127
  command.append("--giskard_hub_unlock_token")
128
  command.append(os.environ.get(HF_GSK_HUB_UNLOCK_TOKEN))
129
 
 
 
 
130
  eval_str = f"[{m_id}]<{d_id}({config}, {split} set)>"
131
 
132
  write_log_to_user_file(
 
54
  uid,
55
  label_mapping,
56
  feature_mapping,
57
+ verbose,
58
  ):
59
  leaderboard_dataset = None
60
  if os.environ.get("SPACE_ID") == "giskardai/giskard-evaluator":
 
128
  command.append("--giskard_hub_unlock_token")
129
  command.append(os.environ.get(HF_GSK_HUB_UNLOCK_TOKEN))
130
 
131
+ if verbose:
132
+ command.append("--verbose")
133
+
134
  eval_str = f"[{m_id}]<{d_id}({config}, {split} set)>"
135
 
136
  write_log_to_user_file(
text_classification_ui_helpers.py CHANGED
@@ -484,7 +484,7 @@ def show_hf_token_info(token):
484
  return gr.update(visible=False)
485
 
486
 
487
- def try_submit(m_id, d_id, config, split, inference_token, uid):
488
  all_mappings = read_column_mapping(uid)
489
  if not check_column_mapping_keys_validity(all_mappings):
490
  return (gr.update(interactive=True), gr.update(visible=False))
@@ -508,6 +508,7 @@ def try_submit(m_id, d_id, config, split, inference_token, uid):
508
  uid,
509
  label_mapping,
510
  feature_mapping,
 
511
  ),
512
  eval_str,
513
  threading.Lock(),
 
484
  return gr.update(visible=False)
485
 
486
 
487
+ def try_submit(m_id, d_id, config, split, inference_token, uid, verbose):
488
  all_mappings = read_column_mapping(uid)
489
  if not check_column_mapping_keys_validity(all_mappings):
490
  return (gr.update(interactive=True), gr.update(visible=False))
 
508
  uid,
509
  label_mapping,
510
  feature_mapping,
511
+ verbose,
512
  ),
513
  eval_str,
514
  threading.Lock(),