anarchy-ai / LLM-VM

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

ModuleNotFoundError: No module named 'outlines.text' #440

Open cerealceec opened 4 months ago

cerealceec commented 4 months ago

Describe the bug ModuleNotFoundError when importing client:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/cecil/repos/anarchy/LLM-VM/src/llm_vm/client.py", line 6, in <module>
    from llm_vm.completion.optimize import LocalOptimizer
  File "/Users/cecil/repos/anarchy/LLM-VM/src/llm_vm/completion/optimize.py", line 14, in <module>
    from llm_vm.guided_completion import Completion
  File "/Users/cecil/repos/anarchy/LLM-VM/src/llm_vm/guided_completion.py", line 2, in <module>
    import outlines.text.generate as generate
ModuleNotFoundError: No module named 'outlines.text'

To Reproduce Steps to reproduce the behavior:

  1. Install LLM-VM
  2. Open python3 in shell
  3. Import client using from llm_vm.client import Client

Expected behavior Client imports successfully.

Desktop (please complete the following information):

ZigTheUltimate commented 1 month ago

I am facing the same issue while running the project for the first time. The linked PR is not the solution.

We need to change line 2 in guided_completions.py from: import outlines.text.generate as generate to import outlines.generate as generate

cerealceec commented 1 month ago

I am facing the same issue while running the project for the first time. The linked PR is not the solution.

We need to change line 2 in guided_completions.py from: import outlines.text.generate as generate to import outlines.generate as generate

Can I ask why the linked PR is not the solution?

ZigTheUltimate commented 1 month ago

The PR changes the import statement to import outlines.generate.text. That is not correct. It should be import outlines.generate.