INK-USC / CrossFit

Code for paper "CrossFit :weight_lifting:: A Few-shot Learning Challenge for Cross-task Generalization in NLP" (https://arxiv.org/abs/2104.08835)
102 stars 6 forks source link

ModuleNotFoundError: No module named 'transformers.modeling_outputs' #5

Closed harkiratbehl closed 2 years ago

harkiratbehl commented 2 years ago

File "/home/harkirat/research/2022/BI/crossfit_polytropon/bart.py", line 18, in from transformers.modeling_outputs import Seq2SeqLMOutput ModuleNotFoundError: No module named 'transformers.modeling_outputs'

Hello,

I cannot seem to run the code. I tried to check the particular commit that you specified for Transformers repo. But this path (transformers.modeling_outputs) did not exist in that commit. However, it exists in the newer commits. It seems like you might have been using some other commit.

Could the authors try to run the code and see if it works? We would really appreciate any help with this. We are really excited to use your Benchmark.

Regards Harkirat https://harkiratbehl.github.io/

cherry979988 commented 2 years ago

Hi Harkirat! Thanks for raising the issue.

From the error message I see that you may be using the fix of bart.py in Issue #3 as it uses Seq2SeqLMOutput. That is a fix for transformer 4.10.0, as requested by the author of Issue #3.

Please use either one of the following:

Sorry that this is a bit of a mess due to transformer upgrading and my code not being compatible. Let me know if new error messages pop up.

harkiratbehl commented 2 years ago

Thanks, it works with the right version of Transformer