fix typo
Browse files- logscoremetric.py +1 -1
logscoremetric.py
CHANGED
@@ -108,7 +108,7 @@ class LogScoreMetric(evaluate.Metric):
|
|
108 |
|
109 |
# replace all digits in the reference timestamp (first timestamp) with '/d' to get
|
110 |
# a regex that describes the format
|
111 |
-
pred_timestring_pattern = re.sub(r'\d', r'\\d', re.escape(pred_timestrings[0])) if (len(pred_timestrings > 0)
|
112 |
|
113 |
# A variable to save the previous timestamp (as datetime obj) to check monotonicity
|
114 |
prev_datetime = None
|
|
|
108 |
|
109 |
# replace all digits in the reference timestamp (first timestamp) with '/d' to get
|
110 |
# a regex that describes the format
|
111 |
+
pred_timestring_pattern = re.sub(r'\d', r'\\d', re.escape(pred_timestrings[0])) if (len(pred_timestrings) > 0) else ""
|
112 |
|
113 |
# A variable to save the previous timestamp (as datetime obj) to check monotonicity
|
114 |
prev_datetime = None
|