Update scoring/specificity.py
Browse files- scoring/specificity.py +8 -2
scoring/specificity.py
CHANGED
@@ -93,6 +93,8 @@ def predict_batch(items: ProblematicList):
|
|
93 |
|
94 |
try:
|
95 |
results = []
|
|
|
|
|
96 |
|
97 |
# Batch processing
|
98 |
batch_size = 8
|
@@ -119,7 +121,11 @@ def predict_batch(items: ProblematicList):
|
|
119 |
)
|
120 |
)
|
121 |
|
122 |
-
|
123 |
|
|
|
|
|
|
|
124 |
except Exception as e:
|
125 |
-
print(f"
|
|
|
|
93 |
|
94 |
try:
|
95 |
results = []
|
96 |
+
if not items.problematics:
|
97 |
+
return []
|
98 |
|
99 |
# Batch processing
|
100 |
batch_size = 8
|
|
|
121 |
)
|
122 |
)
|
123 |
|
124 |
+
return results
|
125 |
|
126 |
+
except AttributeError as ae:
|
127 |
+
print(f"AttributeError during prediction in predict_batch (likely wrong input type): {str(ae)}")
|
128 |
+
return []
|
129 |
except Exception as e:
|
130 |
+
print(f"Generic error during prediction in predict_batch: {str(e)}")
|
131 |
+
return []
|