From eb26548f6d52fe24bae4fdea0f73979d1f8c0003 Mon Sep 17 00:00:00 2001 From: ShenYuhan Date: Wed, 5 Aug 2020 10:42:15 +0800 Subject: [PATCH] Save first point. (#735) --- visualdl/server/data_manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/visualdl/server/data_manager.py b/visualdl/server/data_manager.py index 6dcaa58f..92bef1fd 100644 --- a/visualdl/server/data_manager.py +++ b/visualdl/server/data_manager.py @@ -222,7 +222,7 @@ class _ReservoirBucket(object): if len(self._items) < self._max_size or self._max_size == 0: self._items.append(item) else: - r = self._random.randint(0, self._num_items_index) + r = self._random.randint(1, self._num_items_index) if r < self._max_size: self._items.pop(r) self._items.append(item) -- GitLab