From 550c751de6e6692388fd52b54cbce400fc8e64b4 Mon Sep 17 00:00:00 2001 From: Almonok Date: Fri, 25 Oct 2024 18:43:01 +0200 Subject: [PATCH] fix(numeric type issue): :bug: making sure the division returns an int --- colbert/index_updater.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/colbert/index_updater.py b/colbert/index_updater.py index cc5c02e1..3f2b0f82 100644 --- a/colbert/index_updater.py +++ b/colbert/index_updater.py @@ -199,7 +199,7 @@ def persist_to_disk(self): if curr_num_chunks == 1: avg_chunksize = DEFAULT_CHUNKSIZE else: - avg_chunksize = last_chunk_metadata["passage_offset"] / ( + avg_chunksize = last_chunk_metadata["passage_offset"] // ( curr_num_chunks - 1 ) print_message(f"#> Current average chunksize is: {avg_chunksize}.")