gsk 2405 amend config file and change monitors

#13
by ZeroCommand - opened
Files changed (2) hide show
  1. app.py +4 -4
  2. config.yaml +6 -0
app.py CHANGED
@@ -186,7 +186,7 @@ def try_submit(m_id, d_id, config, split, id2label_mapping_dataframe, feature_ma
186
  "--output_portal", "huggingface",
187
  "--feature_mapping", json.dumps(feature_mapping),
188
  "--label_mapping", json.dumps(label_mapping),
189
- "--scan_config", "./config.yaml",
190
  ]
191
 
192
  eval_str = f"[{m_id}]<{d_id}({config}, {split} set)>"
@@ -291,7 +291,7 @@ with gr.Blocks(theme=theme) as iface:
291
  dataset_id_input.blur(check_dataset_and_get_config, dataset_id_input, dataset_config_input)
292
  dataset_id_input.submit(check_dataset_and_get_config, dataset_id_input, dataset_config_input)
293
 
294
- dataset_config_input.blur(
295
  check_dataset_and_get_split,
296
  inputs=[dataset_config_input, dataset_id_input],
297
  outputs=[dataset_split_input])
@@ -333,10 +333,10 @@ with gr.Blocks(theme=theme) as iface:
333
  dataset_id_input.blur(gate_validate_btn,
334
  inputs=[model_id_input, dataset_id_input, dataset_config_input, dataset_split_input],
335
  outputs=[run_btn, loading_row, preview_row, example_input, example_labels, id2label_mapping_dataframe, feature_mapping_dataframe])
336
- dataset_config_input.input(gate_validate_btn,
337
  inputs=[model_id_input, dataset_id_input, dataset_config_input, dataset_split_input],
338
  outputs=[run_btn, loading_row, preview_row, example_input, example_labels, id2label_mapping_dataframe, feature_mapping_dataframe])
339
- dataset_split_input.input(gate_validate_btn,
340
  inputs=[model_id_input, dataset_id_input, dataset_config_input, dataset_split_input],
341
  outputs=[run_btn, loading_row, preview_row, example_input, example_labels, id2label_mapping_dataframe, feature_mapping_dataframe])
342
  id2label_mapping_dataframe.input(gate_validate_btn,
 
186
  "--output_portal", "huggingface",
187
  "--feature_mapping", json.dumps(feature_mapping),
188
  "--label_mapping", json.dumps(label_mapping),
189
+ "--scan_config", "../config.yaml",
190
  ]
191
 
192
  eval_str = f"[{m_id}]<{d_id}({config}, {split} set)>"
 
291
  dataset_id_input.blur(check_dataset_and_get_config, dataset_id_input, dataset_config_input)
292
  dataset_id_input.submit(check_dataset_and_get_config, dataset_id_input, dataset_config_input)
293
 
294
+ dataset_config_input.change(
295
  check_dataset_and_get_split,
296
  inputs=[dataset_config_input, dataset_id_input],
297
  outputs=[dataset_split_input])
 
333
  dataset_id_input.blur(gate_validate_btn,
334
  inputs=[model_id_input, dataset_id_input, dataset_config_input, dataset_split_input],
335
  outputs=[run_btn, loading_row, preview_row, example_input, example_labels, id2label_mapping_dataframe, feature_mapping_dataframe])
336
+ dataset_config_input.change(gate_validate_btn,
337
  inputs=[model_id_input, dataset_id_input, dataset_config_input, dataset_split_input],
338
  outputs=[run_btn, loading_row, preview_row, example_input, example_labels, id2label_mapping_dataframe, feature_mapping_dataframe])
339
+ dataset_split_input.change(gate_validate_btn,
340
  inputs=[model_id_input, dataset_id_input, dataset_config_input, dataset_split_input],
341
  outputs=[run_btn, loading_row, preview_row, example_input, example_labels, id2label_mapping_dataframe, feature_mapping_dataframe])
342
  id2label_mapping_dataframe.input(gate_validate_btn,
config.yaml CHANGED
@@ -6,4 +6,10 @@ detectors:
6
  - underconfidence
7
  - overconfidence
8
  - spurious_correlation
 
 
 
 
 
 
9
  inference_type: hf_pipeline
 
6
  - underconfidence
7
  - overconfidence
8
  - spurious_correlation
9
+
10
+ configuration:
11
+ ethical_bias:
12
+ threshold:
13
+ 0.01
14
+
15
  inference_type: hf_pipeline