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.
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.