Open Sherlock2111 opened 1 year ago
@PromtEngineer please look into this and reply ASAP
@PromtEngineer
My solution can be found here. The issue was caused by not having a cuda device and cuda being default @Sherlock2111.
still not solved
@Sherlock2111 can you elaborate on your issue?
I am trying to run UI I did all the steps but it doesn’t run this the error I got FileNotFoundError: No files were found inside SOURCE_DOCUMENTS, please put a starter file inside before starting the API!
where as I have put my files in the source folder already and code runs on cpu efficiently
please help
So if we look at the code, we notice the error you see is caused by
run_langest_commands = ["python", "ingest.py"]
...
result = subprocess.run(run_langest_commands, capture_output=True)
if result.returncode != 0:
raise FileNotFoundError(
"No files were found inside SOURCE_DOCUMENTS, please put a starter file inside before starting the API!"
)
This means the issue lies in executing the ingest.py
file.
My issues (being on an M1 mac similar to you) came from cuda being the default. This caused the ingest.py
program to exit with an error code. Although the error raised mentions the files in the SOURCE_DOCUMENTS folder, this is not a true representation of the error.
Whenever I run "run_localGPT_API.py", the DB folder will mysteriously disappear.
@conacts so what is the solution?
@Sherlock2111 @davetwchiu I am going to need more information to help solve the problem. For example, send me an example of you having the folder with the .parquet
files from the given example. Also send the actual error of the output. This is what my current directory looks like:
[cs@zsh] ~/junction/localGPT$ tree -L 2
.
├── ACKNOWLEDGEMENT.md
├── CONTRIBUTING.md
├── DB
│ ├── chroma-collections.parquet
│ └── chroma-embeddings.parquet
├── LICENSE
├── README.md
├── SOURCE_DOCUMENTS
│ └── constitution.pdf
├── __pycache__
│ └── constants.cpython-311.pyc
├── constants.py
├── ingest.py
├── localGPT
│ ├── bin
│ ├── lib
│ ├── pyvenv.cfg
│ └── share
├── localGPTUI
│ ├── localGPTUI.py
│ ├── static
│ └── templates
├── pyproject.toml
├── requirements.txt
├── run_localGPT.py
└── run_localGPT_API.py
Now could you run the tree -L 2
command before and after running python run_localGPT_API.py
and send me the results.
Also, are you able to get the prompt to put in a question? This is what mine looks like:
...
AVX = 0 | AVX2 = 0 | AVX512 = 0 | AVX512_VBMI = 0 | AVX512_VNNI = 0 | FMA = 0 | NEON = 1 | ARM_FMA = 1 | F16C = 0 | FP16_VA = 1 | WASM_SIMD = 0 | BLAS = 1 | SSE3 = 0 | VSX = 0 |
Enter a query:
File "/Users/user01/Library/Python/3.9/lib/python/site-packages/auto_gptq/nn_modules/qlinear/qlinear_cuda_old.py", line 83, in init self.autogptq_cuda = autogptq_cuda_256 NameError: name 'autogptq_cuda_256' is not defined
this the new error I'm getting
@Sherlock2111 These scripts are a bit of mess in the current state of the repo (new exciting things are happening too fast I think). It seems the API script tries to re-run the ingest.py
and blows away your DB in the mean time. I commented out the whole section about starting with if os.path.exists(PERSIST_DIRECTORY)
all the way through line you see the SOURCE_DOCUMENTS error on (before # load the vectorstore
)
My API at least runs at this point (still working on the UI...)
The directory does not exist Traceback (most recent call last): File "/Users/user01/localGPT/run_localGPT_API.py", line 53, in
raise FileNotFoundError(
FileNotFoundError: No files were found inside SOURCE_DOCUMENTS, please put a starter file inside before starting the API!