From 690ea2a0f4c3f3ca787ca114d398c9cbd56a4525 Mon Sep 17 00:00:00 2001 From: "min.tian" Date: Wed, 23 Oct 2024 18:02:23 +0800 Subject: [PATCH] fix bug: date to datetime Signed-off-by: min.tian --- vectordb_bench/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vectordb_bench/models.py b/vectordb_bench/models.py index e4c361855..7968e3e26 100644 --- a/vectordb_bench/models.py +++ b/vectordb_bench/models.py @@ -1,6 +1,6 @@ import logging import pathlib -from datetime import date +from datetime import date, datetime from enum import Enum, StrEnum, auto from typing import List, Self @@ -167,7 +167,7 @@ class TestResult(BaseModel): def flush(self): db2case = self.get_db_results() - timestamp = date.today().timestamp() + timestamp = datetime.combine(date.today(), datetime.min.time()).timestamp() result_root = config.RESULTS_LOCAL_DIR for db, result in db2case.items(): self.write_db_file(