Error in How-to-use example

#1
by somaia02 - opened

I tried to run the given example script but I got the following error:
ValueError: The following `model_kwargs` are not used by the model: ['ged_tags'] (note: typos in the generate arguments will also show up in this list)

I'm using Google colab. I did the following:

  1. pip uninstall transformers
  2. pip install git+https://github.com/balhafni/arabic-gec.git@bc21aaca789f1a366c05e8b5e111632944886393#egg=transformers
  3. pip install camel-tools
CAMeL Lab org

This is because our extended version of HF's transformers wasn't installed properly. Here's a Google Colab notebook running the example code we provide.

It's not working. But I found another solution. I copied mbart.py file from the extended version and imported MBartForConditionalGeneration from there.

CAMeL Lab org

Can you provide the error you're getting in the notebook I provided? I made some minor edits and it's fine on my end.

I get No module named 'transformers'
I tried cd .. and run it again but I got this error: cannot import name 'AutoTokenizer' from 'transformers' (unknown location)

CAMeL Lab org

This is mostly likely because you need to restart the runtime of Google Colab notebook after installing our edited version of transformers.

Great. This worked. Thank you.

balhafni changed discussion status to closed

Sign up or log in to comment