lewtun HF staff commited on
Commit
42a189f
β€’
1 Parent(s): f29dc9f

Disable support for question answering

Browse files
Files changed (2) hide show
  1. README.md +1 -1
  2. app.py +6 -1
README.md CHANGED
@@ -22,7 +22,7 @@ The table below shows which tasks are currently supported for evaluation in the
22
  | `multi_class_classification` | βœ… |
23
  | `multi_label_classification` | ❌ |
24
  | `entity_extraction` | βœ… |
25
- | `extractive_question_answering` | βœ… |
26
  | `translation` | βœ… |
27
  | `summarization` | βœ… |
28
  | `image_binary_classification` | βœ… |
22
  | `multi_class_classification` | βœ… |
23
  | `multi_label_classification` | ❌ |
24
  | `entity_extraction` | βœ… |
25
+ | `extractive_question_answering` | ❌ |
26
  | `translation` | βœ… |
27
  | `summarization` | βœ… |
28
  | `image_binary_classification` | βœ… |
app.py CHANGED
@@ -37,7 +37,7 @@ TASK_TO_ID = {
37
  "binary_classification": 1,
38
  "multi_class_classification": 2,
39
  "entity_extraction": 4,
40
- "extractive_question_answering": 5,
41
  "translation": 6,
42
  "summarization": 8,
43
  }
@@ -71,6 +71,7 @@ AUTOTRAIN_TASK_TO_LANG = {
71
 
72
 
73
  SUPPORTED_TASKS = list(TASK_TO_ID.keys())
 
74
 
75
  # Extracted from utils.get_supported_metrics
76
  # Hardcoded for now due to speed / caching constraints
@@ -173,6 +174,10 @@ if metadata is None:
173
 
174
  with st.expander("Advanced configuration"):
175
  # Select task
 
 
 
 
176
  selected_task = st.selectbox(
177
  "Select a task",
178
  SUPPORTED_TASKS,
37
  "binary_classification": 1,
38
  "multi_class_classification": 2,
39
  "entity_extraction": 4,
40
+ # "extractive_question_answering": 5, # Disabled until we have SQuAD metrics support
41
  "translation": 6,
42
  "summarization": 8,
43
  }
71
 
72
 
73
  SUPPORTED_TASKS = list(TASK_TO_ID.keys())
74
+ UNSUPPORTED_TASKS = ["extractive_question_answering"]
75
 
76
  # Extracted from utils.get_supported_metrics
77
  # Hardcoded for now due to speed / caching constraints
174
 
175
  with st.expander("Advanced configuration"):
176
  # Select task
177
+ # Hack to filter for unsupported tasks
178
+ # TODO(lewtun): remove this once we have SQuAD metrics support
179
+ if metadata[0]["task_id"] in UNSUPPORTED_TASKS:
180
+ metadata = None
181
  selected_task = st.selectbox(
182
  "Select a task",
183
  SUPPORTED_TASKS,