Spaces:
Running
Running
jasonshaoshun
commited on
Commit
·
f65df62
1
Parent(s):
55ba7bd
debug
Browse files- src/display/utils.py +27 -7
src/display/utils.py
CHANGED
@@ -119,23 +119,43 @@ BENCHMARK_COLS_MIB_CAUSALGRAPH = []
|
|
119 |
# ColumnContent(col_name, "number", True)
|
120 |
# ])
|
121 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
auto_eval_column_dict_mib_causalgraph = []
|
123 |
|
124 |
# Method name column
|
125 |
auto_eval_column_dict_mib_causalgraph.append(["method", ColumnContent, ColumnContent("Method", "markdown", True, never_hidden=True)])
|
126 |
|
127 |
-
# For each model-task-intervention combination
|
128 |
for task in TasksMib_Causalgraph:
|
129 |
-
for model in
|
130 |
-
model_name = model.lower() # Convert model name to lowercase
|
131 |
for layer in task.value.layers:
|
132 |
for intervention in task.value.interventions:
|
133 |
for counterfactual in task.value.counterfactuals:
|
134 |
-
#
|
135 |
-
col_name = f"{
|
136 |
-
field_name = col_name.lower()
|
137 |
auto_eval_column_dict_mib_causalgraph.append([
|
138 |
-
|
139 |
ColumnContent,
|
140 |
ColumnContent(col_name, "number", True)
|
141 |
])
|
|
|
119 |
# ColumnContent(col_name, "number", True)
|
120 |
# ])
|
121 |
|
122 |
+
# auto_eval_column_dict_mib_causalgraph = []
|
123 |
+
|
124 |
+
# # Method name column
|
125 |
+
# auto_eval_column_dict_mib_causalgraph.append(["method", ColumnContent, ColumnContent("Method", "markdown", True, never_hidden=True)])
|
126 |
+
|
127 |
+
# # For each model-task-intervention combination
|
128 |
+
# for task in TasksMib_Causalgraph:
|
129 |
+
# for model in task.value.models:
|
130 |
+
# model_name = model.lower() # Convert model name to lowercase
|
131 |
+
# for layer in task.value.layers:
|
132 |
+
# for intervention in task.value.interventions:
|
133 |
+
# for counterfactual in task.value.counterfactuals:
|
134 |
+
# # Include model name in the column name
|
135 |
+
# col_name = f"{model_name}_layer{layer}_{intervention}_{counterfactual}"
|
136 |
+
# field_name = col_name.lower()
|
137 |
+
# auto_eval_column_dict_mib_causalgraph.append([
|
138 |
+
# field_name,
|
139 |
+
# ColumnContent,
|
140 |
+
# ColumnContent(col_name, "number", True)
|
141 |
+
# ])
|
142 |
+
|
143 |
+
# In utils.py, modify auto_eval_column_dict_mib_causalgraph:
|
144 |
auto_eval_column_dict_mib_causalgraph = []
|
145 |
|
146 |
# Method name column
|
147 |
auto_eval_column_dict_mib_causalgraph.append(["method", ColumnContent, ColumnContent("Method", "markdown", True, never_hidden=True)])
|
148 |
|
149 |
+
# For each model-task-intervention-counterfactual combination
|
150 |
for task in TasksMib_Causalgraph:
|
151 |
+
for model in ["qwen2forcausallm", "gemma2forcausallm", "llamaforcausallm"]: # exact model names
|
|
|
152 |
for layer in task.value.layers:
|
153 |
for intervention in task.value.interventions:
|
154 |
for counterfactual in task.value.counterfactuals:
|
155 |
+
# Match the exact format from the data
|
156 |
+
col_name = f"{model}_layer{layer}_{intervention}_{counterfactual}".lower()
|
|
|
157 |
auto_eval_column_dict_mib_causalgraph.append([
|
158 |
+
col_name,
|
159 |
ColumnContent,
|
160 |
ColumnContent(col_name, "number", True)
|
161 |
])
|