danliu2 / caat

MIT License
34 stars 2 forks source link

TypeError: Cannot create a consistent method resolution order (MRO) for bases FairseqIncrementalState, MultiheadAttention #2

Closed Renaissance25 closed 3 years ago

Renaissance25 commented 3 years ago

There is error with fairseq-main code. Can you tell me what fairseq edition for your code? thanks

danliu2 commented 3 years ago

My experiments are based on fairseq "1.0.0a0". The bug you met may be caused by rain/layers/multihead_attention_patched.py:line23. I modified MultiheadAttention to ensure attention ok while key is empty(This may occured during inference of CAAT). at line 266-272. Remove the decoration “with_incremental_state” may solve this problem. Thanks a lot for telling me this. I'll fix this code soon.

danliu2 commented 3 years ago

solved