Skip to content

Commit 4bb3bf0

Browse files
k0machisoyacz
authored andcommitted
fix(event_similarity_processor_v2): Stricter duplicate distance checking
V1 was using 0.95, use [-0.05,0.05] range for V2 to enable similarly strict comparisons Fixes ARGUS-112
1 parent b51ed29 commit 4bb3bf0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

argusAI/event_similarity_processor_v2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def _mark_event_is_duplicate(self, run_id: str, ts: datetime, severity: str, emb
139139
]
140140
if len(dupe_embeddings) == 0:
141141
return False
142-
dupe_embedding = next((row for row, distance in dupe_embeddings if -0.1 < distance < 0.1), None)
142+
dupe_embedding = next((row for row, distance in dupe_embeddings if -0.05 < distance < 0.05), None)
143143
if not dupe_embedding:
144144
return False
145145
q = f"SELECT event_id FROM {SCTEvent.__table_name__} WHERE run_id = ? AND severity = ? AND ts = ?"

0 commit comments

Comments
 (0)