Skip to content

Commit 91b443b

Browse files
committed
added changes
1 parent 9c24bd1 commit 91b443b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tok/partitioned_hnsw/partitioned_hnsw.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ func (ph *partitionedHNSW[T]) NumSeedVectors() int {
102102

103103
func (ph *partitionedHNSW[T]) StartBuild(caches []index.CacheType) {
104104
ph.caches = caches
105-
if ph.buildPass <= ph.partition.NumPasses() {
105+
if ph.buildPass < ph.partition.NumPasses() {
106106
ph.partition.StartBuildPass()
107107
return
108108
}
@@ -119,7 +119,7 @@ func (ph *partitionedHNSW[T]) StartBuild(caches []index.CacheType) {
119119
func (ph *partitionedHNSW[T]) EndBuild() []int {
120120
res := []int{}
121121

122-
if ph.buildPass > ph.partition.NumPasses() {
122+
if ph.buildPass >= ph.partition.NumPasses() {
123123
for i := range ph.clusterMap {
124124
if i%NUM_PASSES != (ph.buildPass - ph.partition.NumPasses()) {
125125
continue
@@ -135,7 +135,7 @@ func (ph *partitionedHNSW[T]) EndBuild() []int {
135135
return res
136136
}
137137

138-
if ph.buildPass <= ph.partition.NumPasses() {
138+
if ph.buildPass < ph.partition.NumPasses() {
139139
ph.partition.EndBuildPass()
140140
}
141141
return []int{}

0 commit comments

Comments
 (0)