transformer_pytorch
transformer_pytorch copied to clipboard
TypeError: issubclass() arg 1 must be a class
https://github.com/cpm0722/transformer_pytorch/blob/76597a44348b42cb01f4728066795a4d03a1ff06/main.py#L20
If someone runs the above code and gets the following error:
File "/home/user_name/anaconda3/envs/transformer_pytorch/lib/python3.9/typing.py", line 852, in __subclasscheck__
return issubclass(cls, self.__origin__)
TypeError: issubclass() arg 1 must be a class
Then ensuring that the typing_extension is version 4.5.0 may fix this bug:
pip install typing_extensions==4.5.0