Spaces:
Runtime error
Runtime error
Commit
·
4e4285d
1
Parent(s):
1d63fe1
Update aggregate_server_json.py
Browse files- aggregate_server_json.py +2 -2
aggregate_server_json.py
CHANGED
|
@@ -274,7 +274,6 @@ class AggregateNER:
|
|
| 274 |
ret_arr = self.get_predictions_above_threshold(results[server_index]["orig_cs_prediction_details"][pivot_index])
|
| 275 |
orig_cs_second_entity = results[server_index]["orig_cs_prediction_details"][pivot_index]['cs_distribution'][1]
|
| 276 |
m2_cs = orig_cs_second_entity["e"].split('[')[0]
|
| 277 |
-
print("m2_cs",m2_cs,"ret_arr",ret_arr)
|
| 278 |
is_cs_included = True if (m2_cs in servers_arr[server_index]["precedence"]) else False
|
| 279 |
is_cs_included = True #Disabling cs included check. If prediction above threshold is cross prediction, then letting it through
|
| 280 |
assert (m2_cs != m1)
|
|
@@ -298,8 +297,9 @@ class AggregateNER:
|
|
| 298 |
ret_arr = self.get_predictions_above_threshold(results[server_index]["orig_cs_prediction_details"][pivot_index])
|
| 299 |
orig_cs_second_entity = results[server_index]["orig_cs_prediction_details"][pivot_index]['cs_distribution'][1]
|
| 300 |
m2_cs = orig_cs_second_entity["e"].split('[')[0]
|
|
|
|
| 301 |
is_cs_included = True if (m2_cs in servers_arr[server_index]["precedence"]) else False
|
| 302 |
-
is_cs_included = True #Disabling cs included check. If prediction above threshold is cross prediction, then letting it through
|
| 303 |
assert (m2_cs != m1)
|
| 304 |
if (is_cs_included and self.check_if_entity_in_arr(m2_cs,ret_arr)):
|
| 305 |
ret_obj = results[server_index]["ner"][run_index].copy()
|
|
|
|
| 274 |
ret_arr = self.get_predictions_above_threshold(results[server_index]["orig_cs_prediction_details"][pivot_index])
|
| 275 |
orig_cs_second_entity = results[server_index]["orig_cs_prediction_details"][pivot_index]['cs_distribution'][1]
|
| 276 |
m2_cs = orig_cs_second_entity["e"].split('[')[0]
|
|
|
|
| 277 |
is_cs_included = True if (m2_cs in servers_arr[server_index]["precedence"]) else False
|
| 278 |
is_cs_included = True #Disabling cs included check. If prediction above threshold is cross prediction, then letting it through
|
| 279 |
assert (m2_cs != m1)
|
|
|
|
| 297 |
ret_arr = self.get_predictions_above_threshold(results[server_index]["orig_cs_prediction_details"][pivot_index])
|
| 298 |
orig_cs_second_entity = results[server_index]["orig_cs_prediction_details"][pivot_index]['cs_distribution'][1]
|
| 299 |
m2_cs = orig_cs_second_entity["e"].split('[')[0]
|
| 300 |
+
print("m2_cs",m2_cs,"ret_arr",ret_arr)
|
| 301 |
is_cs_included = True if (m2_cs in servers_arr[server_index]["precedence"]) else False
|
| 302 |
+
#is_cs_included = True #Disabling cs included check. If prediction above threshold is cross prediction, then letting it through
|
| 303 |
assert (m2_cs != m1)
|
| 304 |
if (is_cs_included and self.check_if_entity_in_arr(m2_cs,ret_arr)):
|
| 305 |
ret_obj = results[server_index]["ner"][run_index].copy()
|