diff --git a/colbert/index_updater.py b/colbert/index_updater.py index cc5c02e1..7f6f7e9c 100644 --- a/colbert/index_updater.py +++ b/colbert/index_updater.py @@ -415,7 +415,7 @@ def _add_pid_to_ivf(self, partitions, pid, old_ivf, old_ivf_lengths): new_ivf_lengths[-1] += 1 partitions_runner += 1 - assert ivf_runner == len(old_ivf) + assert ivf_runner == len(old_ivf) or sum(old_ivf[ivf_runner:])==0 assert sum(new_ivf_lengths) == len(new_ivf) return new_ivf, new_ivf_lengths