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

FAISS component seems to be producing a runtime error with 1.1.3 #6072

Open
bsleuth opened this issue Feb 2, 2025 · 5 comments
Open

FAISS component seems to be producing a runtime error with 1.1.3 #6072

bsleuth opened this issue Feb 2, 2025 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@bsleuth
Copy link

bsleuth commented Feb 2, 2025

RuntimeError: Error in faiss::FileIOReader::FileIOReader(const char*) at                 
                             /project/faiss/faiss/impl/io.cpp:67: Error: 'f' failed: could not open                   
                             /home/xxx/LangFlow/test/index.faiss for reading: No such file or             
                             directory 

I would expect the component to create the directory if it does not exist? This does seem like an issue after upgrading from 1.1.1 - don't know whether I am missing something...

I am starting langflow from the LangFlow directory on Ubuntu 24

Copy link

dosubot bot commented Feb 2, 2025

Hey @bsleuth! I'm here to help you with any bugs, questions, or contributions you have in mind. Let's tackle this issue together!

The runtime error you're encountering is due to the persist_directory not being specified or the directory not existing. The FAISS component in LangFlow requires a valid directory to save or load the FAISS index, and it does not automatically create the directory if it does not exist. You need to manually create the directory specified in persist_directory before starting LangFlow to avoid this error [1].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@dosubot dosubot bot added the bug Something isn't working label Feb 2, 2025
@bsleuth
Copy link
Author

bsleuth commented Feb 2, 2025

@dosu

The persist directory exists as 'test' and the index name is provided as 'index'.

If I create the directory manually I get:

RuntimeError: Error in faiss::FileIOReader::FileIOReader(const char*) at
/project/faiss/faiss/impl/io.cpp:67: Error: 'f' failed: could not open
/home/xxx/LangFlow/test/index.faiss for reading: No such file or
directory

Copy link

dosubot bot commented Feb 2, 2025

The error you're encountering suggests that the FAISS component is trying to read an index file that doesn't exist at the specified path. Here are a few things to check:

  1. File Path: Ensure that the file path is correctly specified. The FAISS component expects the file path in the format <resolved_folder_path>/<index_name>. In your case, it should be /home/xxx/LangFlow/test/index (without the .faiss extension) [1].

  2. File Existence: Verify that the file index actually exists in the test directory. If the file is missing, you'll need to create or save the FAISS index first before attempting to load it.

  3. Permissions: Check the file and directory permissions to ensure that the process running LangFlow has the necessary read and write permissions for the directory and file.

If the file doesn't exist, you might need to run the process that creates and saves the FAISS index before attempting to load it. If the issue persists, double-check the configuration settings and ensure that the persist_directory and index_name are correctly set.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@bsleuth
Copy link
Author

bsleuth commented Feb 2, 2025

I think there is something wrong. Could someone please help?

@Cristhianzl
Copy link
Member

hi @bsleuth,

The component is failing due to path resolution issues after becoming outdated. Please review PR #6081 for the fix.

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants