Open mjavedgohar opened 1 year ago
Hi, the reason for that issue is that Google Colab environment uses a newer version of the Transformer library that is incompatible to the code.
You could adapt the code to the newer version by making the following changes at https://github.com/AIPHES/ACL20-Reference-Free-MT-Evaluation/blob/master/score_utils.py#L20
From:
L20: output, _, x_encoded_layers, _ = model(input_ids = x, token_type_ids = None, attention_mask = attention_mask)
L21: return x_encoded_layers
To:
L20: output = model(input_ids = x, token_type_ids = None, attention_mask = attention_mask)
L21: return output. hidden_states
Regarding your own datasets, you could arrange the datasets into the format like this, and then change the data_path in demo.py and run it.
Hopefully this helps.
@andyweizhao Thanks for your help. It worked for me. Can you please guide me for the steps to train for any language that is not on the current list e.g. Hindi, Arabic etc? Can you please also explain the .BAM & .GBDD files with layers 8 and 12?
Thanks
Hi @andyweizhao,
I am trying to execute the demo.py and main.py scripts but getting the following error in google colab notebook. can you please help me resolve this? and how can I test my own translation dataset?
TypeError Traceback (most recent call last)