localGPT icon indicating copy to clipboard operation
localGPT copied to clipboard

is:issue TypeError: issubclass() arg 1 must be a class

Open heaversm opened this issue 1 year ago • 3 comments

when attempting python ingest.py

I get the error is:issue TypeError: issubclass() arg 1 must be a class

File "[...]/anaconda3/lib/python3.8/typing.py", line 774, in __subclasscheck__
    return issubclass(cls, self.__origin__)

heaversm avatar Jun 12 '23 21:06 heaversm

I get the same error on Ubuntu.

File "/usr/lib/python3.8/typing.py", line 774, in subclasscheck return issubclass(cls, self.origin) TypeError: issubclass() arg 1 must be a class

mindwellsolutions avatar Jun 18 '23 21:06 mindwellsolutions

Same here, wondering if this is something within the autogptq side:

  File "pydantic/fields.py", line 668, in pydantic.fields.ModelField._type_analysis
  File "${HOME}/miniconda3/envs/autogptq/lib/python3.8/typing.py", line 774, in __subclasscheck__
    return issubclass(cls, self.__origin__)
TypeError: issubclass() arg 1 must be a class

klei22 avatar Jul 01 '23 14:07 klei22

Wanted to update, was able to get around this issue by creating a fresh conda env and installing the pip requirements from scratch. (An aside: before I was cloning a conda env from nanogpt in case I could leverage its pytorch-gpu setup).

That being said I did not clone the autogptq or install it's requirements.txt this time around either, so I haven't ruled this out as a factor just yet.

So I think it may be one both of the following:

  1. needing to install from fresh env (conda in my case)
  2. needing to running without installing (clonind and installing requirements.txt) of autogptq

klei22 avatar Jul 01 '23 16:07 klei22

conda create -n localGPT python=3.10.12

lostmaniac avatar Aug 09 '23 06:08 lostmaniac