Skip to content

Commit 9a2e37a

Browse files
robertnishiharapcmoritz
authored andcommitted
Don't record event log on driver. (#1217)
1 parent 0eae917 commit 9a2e37a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

python/ray/worker.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2095,7 +2095,10 @@ def log(event_type, kind, contents=None, worker=global_worker):
20952095
assert isinstance(contents, dict)
20962096
# Make sure all of the keys and values in the dictionary are strings.
20972097
contents = {str(k): str(v) for k, v in contents.items()}
2098-
worker.events.append((time.time(), event_type, kind, contents))
2098+
# Log the event if this is a worker and not a driver, since the driver's
2099+
# event log never gets flushed.
2100+
if worker.mode == WORKER_MODE:
2101+
worker.events.append((time.time(), event_type, kind, contents))
20992102

21002103

21012104
def flush_log(worker=global_worker):

0 commit comments

Comments
 (0)