Skip to content

Ensure BFIndex is pickleable #605

Open
@davnn

Description

@davnn

It's currently not possible to pickle the BFIndex, while the Index can be pickled.

import pickle
from hnswlib import BFIndex

index = BFIndex(space="l2", dim=10)

with open("index.hnswlib", "wb") as f:
    pickle.dump(index, f)

It would be nice if both index types could be pickled, how hard would it be to support pickling for BFIndex?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions