Skip to content

Commit f26a217

Browse files
committed
Ignore labels wrong start and end times
1 parent deb843d commit f26a217

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/edgeml/Dataset.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ def data(self):
4646
for label in labeling.labels:
4747
if labeling.name not in df.columns:
4848
df[labeling.name] = ""
49+
if label.start < 0 or label.start > 2147483647000 or label.end < 0 or label.end > 2147483647000:
50+
continue
4951
label_start = pd.to_datetime(label.start, unit='ms')
5052
label_end = pd.to_datetime(label.end, unit='ms')
5153
df.loc[(df['time'] >= label_start) & (df['time'] <= label_end), labeling.name] = label.name

0 commit comments

Comments
 (0)