Faiss: [Feature Request] Node-Gyp Bindings

Created on 26 Feb 2019  Â·  11Comments  Â·  Source: facebookresearch/faiss

Summary

It would be worth to add a native node-gyp bindings as Spotify Annoy index does here https://github.com/jimkang/annoy-node

Platform

OS:

Faiss version:

Faiss compilation options:

Running on:

  • [X] CPU
  • [X] GPU

Interface:

  • [ ] C++
  • [ ] Python
  • [X] Node.js

Reproduction instructions

enhancement

Most helpful comment

This is not on our roadmap but could possibly be supported by the community.

On Tue 26 Feb 2019 at 18:21, Eduardo Pinho notifications@github.com wrote:

node-gyp https://github.com/nodejs/node-gyp is a tool for building Node.js
addons https://nodejs.org/dist/latest-v10.x/docs/api/addons.html. This
feature request amounts to creating JavaScript bindings that would run on a
Node.js runtime.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/facebookresearch/faiss/issues/730#issuecomment-467530906,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACHPYsNzfn9FQjvCFvLZsYu3RzKEc6XVks5vRW0agaJpZM4bR7ek
.

>

Lucas Hosseini
lucas.[email protected]

All 11 comments

What is node-gyp?

node-gyp is a tool for building Node.js addons. This feature request amounts to creating JavaScript bindings that would run on a Node.js runtime.

This is not on our roadmap but could possibly be supported by the community.

On Tue 26 Feb 2019 at 18:21, Eduardo Pinho notifications@github.com wrote:

node-gyp https://github.com/nodejs/node-gyp is a tool for building Node.js
addons https://nodejs.org/dist/latest-v10.x/docs/api/addons.html. This
feature request amounts to creating JavaScript bindings that would run on a
Node.js runtime.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/facebookresearch/faiss/issues/730#issuecomment-467530906,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACHPYsNzfn9FQjvCFvLZsYu3RzKEc6XVks5vRW0agaJpZM4bR7ek
.

>

Lucas Hosseini
lucas.[email protected]

@beauby thank you, yes it good be an idea that someone could add a PR. Adding here that node-gyp is proven to not add too much overhead through the native binding, and the module will run fast as its native version. I'm using this approach not only for C++ bindings, like native Annoy, FastText, Hunspell, but also to bind whole Java (https://github.com/joeferner/node-java) to run ML pipelines like CoreNLP in Node.js etc.

Javascript is supported as an interface language by SWIG, see
http://www.swig.org/Doc3.0/Javascript.html#Javascript
so the whole Faiss API can be exposed.

I made a project. @loretoparisi do you want to give it a try?
https://github.com/facebookresearch/faiss/projects/4

@mdouze yes!

Closing, please reopen if you plan to work on this.

@beauby thanks hopefully yes.

Is anyone available to pick this task up on freelance basis?

Sorry to necrobump this issue but has there been any advance ? I guess the only other solution was mentioned by @loretoparisi is to use annoy but faiss is really nice to use in python and I guess it would have the same sucess on node.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

linghuang picture linghuang  Â·  3Comments

hipitt picture hipitt  Â·  3Comments

0DF0Arc picture 0DF0Arc  Â·  3Comments

danny1984 picture danny1984  Â·  3Comments

lukedeo picture lukedeo  Â·  3Comments