anarchy-ai / LLM-VM

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

[asyncStart] TypeError: 'NoneType' object is not callable #166

Closed INF800 closed 1 year ago

INF800 commented 1 year ago

Both the .finetune(...) methods of gpt and chat_gpt classes return None.

But these methods are called by

https://github.com/anarchy-ai/LLM-VM/blob/b2e0cdad6a3d01c8812d31266bb84c9111fb1784/src/llm_vm/completion/optimize.py#L39-L45

using line https://github.com/anarchy-ai/LLM-VM/blob/b2e0cdad6a3d01c8812d31266bb84c9111fb1784/src/llm_vm/completion/optimize.py#L276

Note, that asyncStart cannot handle foo=None. Which raises an exception:

Exception in thread Thread-3 (new_thread):
Traceback (most recent call last):
  File "/usr/local/python/3.10.8/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/usr/local/python/3.10.8/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/workspaces/LLM-VM/src/llm_vm/completion/optimize.py", line 42, in new_thread
    t[0] = foo()
TypeError: 'NoneType' object is not callable

To fix this we can either make changes to asyncStart so that it handles NoneType or make sure that all .finetune(...) methods return a function using ABC.

SainiAditya1 commented 1 year ago

Assign me this.

Jobhdez commented 1 year ago

I have submitted a pr for this. please review my code https://github.com/anarchy-ai/LLM-VM/pull/203

mmirman commented 1 year ago

closed by #203