From 4c6fccafe6ab9d23e20982e3786c5c9c1185617f Mon Sep 17 00:00:00 2001 From: Eric Liang Date: Tue, 10 May 2022 21:04:40 -0700 Subject: [PATCH] Add a small timeline delay (#24673) --- python/ray/state.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/python/ray/state.py b/python/ray/state.py index 9f4223345..6a30248a3 100644 --- a/python/ray/state.py +++ b/python/ray/state.py @@ -456,6 +456,13 @@ class GlobalState: self._check_connected() + # Add a small delay to account for propagation delay of events to the GCS. + # This should be harmless enough but prevents calls to timeline() from + # missing recent timeline data. + import time + + time.sleep(1) + profile_table = self.profile_table() all_events = []