Comments (16)
This seems identical to the issue I have with HNSWlib-node.
It might be coincidental, but in case this is a langchainjs issue, not faiss, see:
langchain-ai/langchainjs#943
langchain-ai/langchainjs#1764
from faiss-node.
@abgupta99 Thank you for the issue, I will try to reproduce and fix it
from faiss-node.
The new version was released, To use faiss-node in AWS, you can download faiss-node-vX.X.X-aws-x64.zip
from release. and upload to AWS as a layer.
BTW. if you are using the faiss-node as layer, do NOT install faiss-node as npm package in your AWS Function, see the demo here: langchain-ai/langchainjs#1930 (comment)
from faiss-node.
Spent the day building test cases for this, and it's the same langchainjs error.
Most approaches end up with:
"Could not import faiss-node. Please install faiss-node as a dependency with, e.g. npm install -S faiss-node
.\n\nError: libgomp.so.1: cannot open shared object file: No such file or directory"
Currently I see that there is any route to using langchain with either faiss or hnswnlib on AWS Lambda.
from faiss-node.
Having similar problem when deployed on Vercel, while on local dev is working fine
Could not import faiss-node. Please install faiss-node as a dependency with, e.g.
npm install -S faiss-node
.\n\nError: libgomp.so.1: cannot open shared object file: No such file or directory","stack":"
from faiss-node.
I have create a build for AWS Lambda in #30
It has not been released yet, but you can try the version I built manually below:
faiss-node-v0.2.2-aws-x64.zip
For other projects, please replace with the files under the path below:
faiss-node-v0.2.2-aws-x64.zip/node_modules/faiss-node/build/Release
from faiss-node.
Hi,
No luck my side Iām afraid: still missing libgomp.so.1:
{
"errorType": "Error",
"errorMessage": "Could not import faiss-node. Please install faiss-node as a dependency with, e.g. `npm install -S faiss-node`.\n\nError: libgomp.so.1: cannot open shared object file: No such file or directory",
"trace": [
"Error: Could not import faiss-node. Please install faiss-node as a dependency with, e.g. `npm install -S faiss-node`.",
"",
"Error: libgomp.so.1: cannot open shared object file: No such file or directory",
" at FaissStore.importFaiss (/opt/nodejs/node_modules/langchain/dist/vectorstores/faiss.cjs:237:19)",
" at async readIndex (/opt/nodejs/node_modules/langchain/dist/vectorstores/faiss.cjs:141:37)",
" at async Promise.all (index 1)",
" at async FaissStore.load (/opt/nodejs/node_modules/langchain/dist/vectorstores/faiss.cjs:144:51)",
" at async query (/var/task/index.js:112:20)",
" at async exports.handler (/var/task/index.js:20:9)"
]
}
Also, after adding the Faiss layer I can't add anything much else as it's far too big:
Layers consume more than the available size of 262144000 bytes
David
from faiss-node.
@dmb0058 I want to know whether it works properly if you directly upload the zip(faiss-node-v0.2.2-aws-x64.zip) I provided above to AWS.
Please confirm that you have replaced the files(node_modules/faiss-node/build/Release) in my zip above to the zip you finally want to upload to AWS.
I also made a demo for langchain here: langchain-ai/langchainjs#1930 (comment)
You can try to upload this demo directly to AWS.
from faiss-node.
Yes, the demo zip (faiss-node-v0.2.2-aws-x64.zip) runs when I upload it as a lambda and gives the same results as you show above.
I can't create a layer though, so can't use this in practice:
aws lambda publish-layer-version --layer-name my-faiss-layer \
--description "My Faiss layer" \
--license-info "MIT" \
--zip-file fileb://my-faiss-node.zip \
--compatible-runtimes nodejs18.x \
--compatible-architectures "x86_64"
An error occurred (RequestEntityTooLargeException) when calling the PublishLayerVersion operation: Request must be smaller than 70167211 bytes for the PublishLayerVersion operation
from faiss-node.
@dmb0058 Can you reduce the size of the zip to make it meet the limit first.
The prebuilt binaries is too large under Linux was also mentioned in your previous issue(#26).
The binaries for AWS have shrunk a lot. The zip containing faiss-node is only 7.5MB. And the zip containing langchain and faiss-node has 15.5MB. Which is far less than the limit of AWS. Please identify what content takes up space and try to reduce it.
from faiss-node.
from faiss-node.
@dmb0058 You can also try this demo langchain-ai/langchainjs#1930 (comment)
from faiss-node.
This now works flawlessly with Fly.io, I had made a cool demo before and now I don't need to copy the zip folder over.
Thank you for maintaining and improving this šš»
from faiss-node.
I'm happy to pay you one time 30$ as the best I can for now. Can you share a buymeacoffee/paypal/stripe link? Thanks!
from faiss-node.
This is totally out of my respect for your work.
from faiss-node.
The newer version is still cannot get through on the lambda layers, still having the same error which is
{
"errorType": "Error",
"errorMessage": "Could not import faiss-node. Please install faiss-node as a dependency with, e.g. npm install -S faiss-node
.\n\nError: libgomp.so.1: cannot open shared object file: No such file or directory",
"trace": [
"Error: Could not import faiss-node. Please install faiss-node as a dependency with, e.g. npm install -S faiss-node
.",
"",
"Error: libgomp.so.1: cannot open shared object file: No such file or directory",
" at FaissStore.importFaiss (/opt/nodejs/node_modules/langchain/dist/vectorstores/faiss.cjs:237:19)",
" at async readIndex (/opt/nodejs/node_modules/langchain/dist/vectorstores/faiss.cjs:141:37)",
" at async Promise.all (index 1)",
" at async FaissStore.load (/opt/nodejs/node_modules/langchain/dist/vectorstores/faiss.cjs:144:51)",
" at async query (/var/task/index.js:112:20)",
" at async exports.handler (/var/task/index.js:20:9)"
]
}
from faiss-node.
Related Issues (20)
- dlopen Symbol not found error on macOS 10.15.7 and Netlify HOT 1
- Docker Installation Failed HOT 2
- CI: Add import test for docker
- Support for arm64 HOT 7
- Replace prebuild with github cli for upload assets
- CUDA/GPU Support? HOT 1
- Unavailable non-musl ARM64 build HOT 1
- Possible to reduce node package size? HOT 6
- Add the option to get the cosine similarity value (score) for each returned label in the search function
- Install failed HOT 2
- Support remove_ids
- [AWS]Any chance of an arm64 build of the Node.js layer HOT 4
- Ability to encode/decode buffers when FS not available? HOT 4
- Error: faiss-node package.json is not node-pre-gyp ready HOT 1
- No way to get the original vector value from the index
- Docker Build Fails on ARM v7 HOT 3
- Add support for threshold based cosine similarity search
- Does not work without internet connection HOT 1
- Vector store initial
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from faiss-node.