Skip to content

Commit a7b76d4

Browse files
author
Dylan Huang
committed
Update broadcast_file_update method to restrict broadcasting to .jsonl files only, preventing unnecessary updates for .lock files.
1 parent 698b04d commit a7b76d4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

eval_protocol/utils/logs_server.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,11 @@ def disconnect(self, websocket: WebSocket):
9393

9494
def broadcast_file_update(self, update_type: str, file_path: str):
9595
"""Broadcast file update to all connected clients."""
96-
if not file_path.startswith(default_logger.datasets_dir):
96+
if not file_path.startswith(default_logger.datasets_dir) and not file_path.endswith(".jsonl"):
97+
"""
98+
.lock files are often created and deleted by the singleton lock
99+
mechanism so we only broadcast .jsonl files
100+
"""
97101
return
98102
logger.info(f"Broadcasting file update: {update_type} {file_path}")
99103

0 commit comments

Comments
 (0)