Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

interrupt for NNDescent #3432

Closed
wants to merge 1 commit into from

Commits on May 14, 2024

  1. interrupt for NNDescent (facebookresearch#3432)

    Summary:
    
    Addresses the issue in facebookresearch#3173 
    
    for `IndexNNDescent`, I see that there is already interrupt implemented for it's [search](https://fburl.com/code/iwn3tqic) API, so I looked into it's `add` API.
    
    For a given dataset nb = 10 mil, iter = 10, K =  32, d = 32 on a CPU only machine reveals that bulk of the cost comes from [nndescent](https://fburl.com/code/5rdb1p5o). For every iteration of `nndescent` takes around ~12 seconds, ~70-80% of the time is spent on `join` method (~10 seconds per iteration) and ~20-30% spent on `update` (~2 second per iteration). Adding the interrupt on the `join` should suffice on quickly terminating the program when users hit ctrl+C (happy to move the interrupt elsewhere if we think otherwise)
    
    Reviewed By: junjieqi, mdouze
    
    Differential Revision: D57300514
    mengdilin authored and facebook-github-bot committed May 14, 2024
    Configuration menu
    Copy the full SHA
    55e3266 View commit details
    Browse the repository at this point in the history