bug fix (logical mistake)
Browse files- logmetric.py +7 -3
logmetric.py
CHANGED
@@ -247,9 +247,13 @@ class LogMetric(evaluate.Metric):
|
|
247 |
ref_logMessages.append(ref_split_log[i+1])
|
248 |
|
249 |
# We extend the shorter list to the length of the longer one
|
250 |
-
|
251 |
-
|
252 |
-
|
|
|
|
|
|
|
|
|
253 |
|
254 |
|
255 |
linecontent_sacrebleu, linecontentlength_difference_SMAPE = self.getLineContentScore(pred_logMessages, ref_logMessages)
|
|
|
247 |
ref_logMessages.append(ref_split_log[i+1])
|
248 |
|
249 |
# We extend the shorter list to the length of the longer one
|
250 |
+
max_logentries = max(len(pred_logMessages), len(ref_logMessages))
|
251 |
+
|
252 |
+
pred_logMessages += (max_logentries - len(pred_logMessages)) * [" "]
|
253 |
+
ref_logMessages += (max_logentries- len(ref_logMessages)) * [" "]
|
254 |
+
|
255 |
+
print(len(pred_logMessages), pred_logMessages)
|
256 |
+
print(len(ref_logMessages), ref_logMessages)
|
257 |
|
258 |
|
259 |
linecontent_sacrebleu, linecontentlength_difference_SMAPE = self.getLineContentScore(pred_logMessages, ref_logMessages)
|