Unbabel / OpenKiwi

Open-Source Machine Translation Quality Estimation in PyTorch
https://unbabel.github.io/OpenKiwi/
GNU Affero General Public License v3.0
229 stars 48 forks source link

TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases #75

Closed Shannen3206 closed 3 years ago

Shannen3206 commented 3 years ago

Describe the bug TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases

To Reproduce

  1. Creat a new file: run.py
    from kiwi.lib.train import train_from_file
    run_info = train_from_file('config/bert.yaml')

    and then execute this program 2、See error TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases

Expected behavior I hope to pass the type check when the parameter is initialized

Screenshots https://github.com/Shannen3206/csn/blob/master/error.png

Environment (please complete the following information):

captainvera commented 3 years ago

Hello @Shannen3206,

How did you install kiwi 2.0.0 on python 3.6.9? Kiwi 2.0.0 requires python >=3.7

I tried reproducing your code on 3.7 and found another bug, being fixed in #76 which should be merged shortly.

Let me know if you have any other problems

captainvera commented 3 years ago

I see you can install openkiwi on 3.6 using pip, but it is unfortunately not supported.

Shannen3206 commented 3 years ago

Python3.7 version solves the previous problem. Thank you very much!

daandouwe commented 3 years ago

Issue closed because it has been resolved.