facebookresearch / MUSE

A library for Multilingual Unsupervised or Supervised word Embeddings
Other
3.17k stars 544 forks source link

ValueError: too many values to unpack (expected 2) in unsupervised.py #188

Open csheehan10 opened 2 years ago

csheehan10 commented 2 years ago

Hello, I'm trying to train model using unsupervised.py with each possible pairing in the set {English, German, Spanish, French, Italian, Portuguese}. The line of code I'm running each time is python unsupervised.py --src_lang en --tgt_lang es --src_emb data/wiki.en.vec --tgt_emb data/wiki.es.vec --n_refinement 5 --export pth (obviously changing the parameters for language and embeddings each time) This has worked fine for 12 of the pairings, and I have saved 12 fitted models, but for some reason when training French-Italian, French-Portuguese, or Italian-Portuguese, I get the following error at the end of the first Adversarial Training epoch:

Traceback (most recent call last): File "unsupervised.py", line 139, in evaluator.all_eval(to_log) File "/mnt/batch/tasks/shared/LS_root/mounts/clusters/cbs11/code/Users/cbs1/muse/src/evaluation/evaluator.py", line 217, in all_eval self.word_translation(to_log) File "/mnt/batch/tasks/shared/LS_root/mounts/clusters/cbs11/code/Users/cbs1/muse/src/evaluation/evaluator.py", line 116, in word_translation results = get_word_translation_accuracy( File "/mnt/batch/tasks/shared/LS_root/mounts/clusters/cbs11/code/Users/cbs1/muse/src/evaluation/word_translation.py", line 96, in get_word_translation_accuracy dico = load_dictionary(path, word2id1, word2id2) File "/mnt/batch/tasks/shared/LS_root/mounts/clusters/cbs11/code/Users/cbs1/muse/src/evaluation/word_translation.py", line 63, in load_dictionary word1, word2 = parts ValueError: too many values to unpack (expected 2)

I've gone through it multiple times and can't see why this only occurs for these language pairs.