-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Labels
bugSomething isn't workingSomething isn't workingwaiting for responseReplied, and waiting for responseReplied, and waiting for response
Description
Describe the bug
I am just trying to use the code provided in documentation inside the VSCODE extrension but I get the error below:
Code:
const { IndexFlatL2 } = require('faiss-node');
const dimension = 2;
const Faissindex = new IndexFlatL2(dimension);
console.log(Faissindex.getDimension()); // 2
console.log(Faissindex.isTrained()); // true
console.log(Faissindex.ntotal()); // 0
// inserting data into index.
Faissindex.add([1, 0]);
Faissindex.add([1, 2]);
Faissindex.add([1, 3]);
Faissindex.add([1, 1]);
console.log(Faissindex.ntotal()); // 4
const k = 4;
const results = Faissindex.search([1, 0], k);
console.log(results.labels); // [ 0, 3, 1, 2 ]
console.log(results.distances); // [ 0, 1, 4, 9 ]
Error:
Activating extension 'Extension.extension' failed: Could not locate the bindings file. Tried:
→ /home/matheus/Projects/Extension/build/faiss-node.node
→ /home/matheus/Projects/Extension/build/Debug/faiss-node.node
→ /home/matheus/Projects/Extension/build/Release/faiss-node.node
→ /home/matheus/Projects/Extension/out/Debug/faiss-node.node
→ /home/matheus/Projects/Extension/Debug/faiss-node.node
→ /home/matheus/Projects/Extension/out/Release/faiss-node.node
→ /home/matheus/Projects/Extension/Release/faiss-node.node
→ /home/matheus/Projects/Extension/build/default/faiss-node.node
→ /home/matheus/Projects/Extension/compiled/16.14.2/linux/x64/faiss-node.node
→ /home/matheus/Projects/Extension/addon-build/release/install-root/faiss-node.node
→ /home/matheus/Projects/Extension/addon-build/debug/install-root/faiss-node.node
→ /home/matheus/Projects/Extension/addon-build/default/install-root/faiss-node.node
→ /home/matheus/Projects/Extension/lib/binding/node-v106-linux-x64/faiss-node.node.
Environment:
- Operating system: [e.g. Linux]
- Nodejs Version: [e.g. v18.15.0]
- Package Version: [e.g. v0.1.0]
- Using inside VSCODE Extenson
To Reproduce
Steps to reproduce the behavior:
- Put the code i suggested in the simplest possible vscode extension app (https://code.visualstudio.com/api/get-started/your-first-extension) and this error will appear when you hit F5 to test it.
Expected behavior
Faiss node should be imported
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
idoganzer
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingwaiting for responseReplied, and waiting for responseReplied, and waiting for response