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

I can't use ollama's model #53

Open
aJarOfCode opened this issue Sep 7, 2024 · 2 comments
Open

I can't use ollama's model #53

aJarOfCode opened this issue Sep 7, 2024 · 2 comments

Comments

@aJarOfCode
Copy link

The documentation says you can use langchain's model options
I changed the code in the example src/test_hipporag.py
the
hipporag = HippoRAG(args.dataset, 'openai', args.extraction_model, args.retrieval_model, doc_ensemble=args.doc_ensemble, dpr_only=args.dpr_only,
qa_model=LangChainModel('openai', 'gpt-3.5-turbo'))
I changed it to
hipporag = HippoRAG(args.dataset, 'ollama', args.extraction_model, args.retrieval_model, doc_ensemble=args.doc_ensemble, dpr_only=args.dpr_only,
qa_model=LangChainModel('ollama', 'llama3'))
When I run python src/test_hipporag.py --dataset hotpotqa --extraction_model llama3 --retrieval_model colbertv2 in the terminal, it returns:

/ home/ajarofcode/anaconda3 / envs/hipporag/lib/python3.9 / site - packages/torch/cuda/set py: 497: UserWarning: Can't initialize NVML
warnings.warn("Can't initialize NVML")
2024-09-07 10:00:14,440 - hipporag - CRITICAL - No extraction files found: output/openie_hotpotqa_results_ner_llama3_*.json ; please check if working directory is correct or if the extraction has been done.
Traceback (most recent call last):
File "/home/ajarofcode/HippoRAG/src/test_hipporag.py", line 26, in
hipporag = HippoRAG(args.dataset, 'ollama', args.extraction_model, args.retrieval_model, doc_ensemble=args.doc_ensemble, dpr_only=args.dpr_only,
File "/home/ajarofcode/HippoRAG/src/hipporag.py", line 107, in init
self.build_graph()
File "/home/ajarofcode/HippoRAG/src/hipporag.py", line 450, in build_graph
for edge, weight in tqdm(self.graph_plus.items(), total=len(self.graph_plus), desc='Building Graph'):
AttributeError: 'HippoRAG' object has no attribute 'graph_plus'
What should I do, please?

@yhshu
Copy link
Contributor

yhshu commented Sep 7, 2024

Hello,
I think you need to check your cuda environment, because I see:

/ home/ajarofcode/anaconda3 / envs/hipporag/lib/python3.9 / site - packages/torch/cuda/set py: 497: UserWarning: Can't initialize NVML
warnings.warn("Can't initialize NVML")

I believe this is an Ollama issue rather than HippoRAG, and you may get help from Ollama community by checking the cuda environments. Subsequent execution is not possible because of indexing failures.

@aJarOfCode
Copy link
Author

aJarOfCode commented Sep 7, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants