Skip to content

bug: src/index/vector/builder.rs:1779:14: called Option::unwrap() on a None value #5616

@wjones127

Description

@wjones127

This occurs while optimizing a IVF_HNSW_SQ/Cosine index.

Originally reported in https://discord.com/channels/1030247538198061086/1456659493659213834

This occurs here:

let min_dist_idx = dists
.values()
.iter()
.position_min_by(|a, b| a.total_cmp(b))
.unwrap();

It's possible the issue is the distance overflowed and thus is infinite. We might have to do something similar to: #4914. Just tested, and infinite and NaN vectors don't disrupt this. It only is None if the vector is empty.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions