anarchy-ai / LLM-VM

irresponsible innovation. Try now at https://chat.dev/
https://anarchy.ai/
MIT License
465 stars 150 forks source link

llm-vm not running, though pip install method #405

Closed MehmetMHY closed 7 months ago

MehmetMHY commented 7 months ago

When I install llm-vm though pip:

pip install llm-vm

And I try to run something like this:

from llm_vm.client import Client
model_name = "bloom"
client = Client(big_model=str(model_name))
response = client.complete(prompt=prompt, temperature=temp)
print(response)

I get the following error:

  File "/home/mehmet/SandBox/_git/internet-hosted/github/ANARCHY/benchllm/env/lib/python3.10/site-packages/llm_vm/completion/data_synthesis.py", line 57, in DataSynthesis
    @backoff.on_exception(backoff.expo, openai.error.RateLimitError)
AttributeError: module 'openai' has no attribute 'error'

:point_up: I believe this error was fixed with this PR https://github.com/anarchy-ai/LLM-VM/pull/392, so I think the issue here is maybe the PyPi package was not updated.

But, after manually fixing this error I ran into this error:

ModuleNotFoundError: No module named 'hnswlib'
/home/mehmet/.pyenv/versions/3.10.4/lib/python3.10/tempfile.py:837: ResourceWarning: Implicitly cleaning up <TemporaryDirectory '/tmp/tmpjo_8rwvu'>
  _warnings.warn(warn_message, ResourceWarning)

I fixed this issue by installing the following package:

pip install hnswlib

We need to fix this issue. I think the root cause is because the PyPi package has not been updated.

VictorOdede commented 7 months ago

Hey I thought I had fixed this but I guess my branch wasn't up to date. Just pushed a new build with the changes. Kindly confirm if it works for you

MehmetMHY commented 7 months ago

Just tested it, it works now. Thanks for the fix Vik