cpm0722 / transformer_pytorch

Transformer(Attention Is All You Need) Implementation in Pytorch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeError: issubclass() arg 1 must be a class

Gaming722 opened this issue · comments

DATASET = Multi30k()

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