Spaces:
Runtime error
Runtime error
ajitrajasekharan
commited on
Commit
•
4cf6282
1
Parent(s):
4e4285d
Update aggregate_server_json.py
Browse files- aggregate_server_json.py +2 -1
aggregate_server_json.py
CHANGED
@@ -295,11 +295,12 @@ class AggregateNER:
|
|
295 |
print("***** here 2")
|
296 |
if (len(results[server_index]["orig_cs_prediction_details"][pivot_index]['cs_distribution']) >= 2):
|
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 |
-
|
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()
|
|
|
295 |
print("***** here 2")
|
296 |
if (len(results[server_index]["orig_cs_prediction_details"][pivot_index]['cs_distribution']) >= 2):
|
297 |
ret_arr = self.get_predictions_above_threshold(results[server_index]["orig_cs_prediction_details"][pivot_index])
|
298 |
+
print("orig cs:",results[server_index]["orig_cs_prediction_details"][pivot_index]['cs_distribution'])
|
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 |
print("m2_cs",m2_cs,"ret_arr",ret_arr)
|
302 |
is_cs_included = True if (m2_cs in servers_arr[server_index]["precedence"]) else False
|
303 |
+
is_cs_included = True #Disabling cs included check. If prediction above threshold is cross prediction, then letting it through
|
304 |
assert (m2_cs != m1)
|
305 |
if (is_cs_included and self.check_if_entity_in_arr(m2_cs,ret_arr)):
|
306 |
ret_obj = results[server_index]["ner"][run_index].copy()
|