Skip to content

Commit

Permalink
Fix panic on IVF building (#772)
Browse files Browse the repository at this point in the history
  • Loading branch information
TreehouseFalcon committed Oct 7, 2023
1 parent 24d69b1 commit 78c016b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions base/search/ivf.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,9 @@ func (idx *IVF) Build(_ context.Context) {
nextDistance = d
}
}
if nextCluster == -1 {
return nil
}
if nextCluster != assignments[i] {
errorCount.Inc()
}
Expand Down

0 comments on commit 78c016b

Please sign in to comment.