Skip to content

Implement timeout for slow functions  #3351

@mdouze

Description

@mdouze

In Faiss, slow functions periodically call InterruptCallback::check()

https://github.com/facebookresearch/faiss/blob/main/faiss/impl/AuxIndexStructures.h#L152

The callback is arbitrary. It does nothing by default.
In python there is an InterruptCallback that checks if the user pressed Ctrl-C.

It would be useful to implement an InterruptCallback that breaks out of a function that lasts too long, eg. a clustering.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions