Skip to content
This repository has been archived by the owner on Feb 1, 2025. It is now read-only.

Fix wrong fairseq version in setup.py #46

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SuJiaKuan
Copy link

When I install LAMA via pip (command: pip install --editable .) and run the sentence filling script (lama/eval_generation.py), the following error occurs:

Traceback (most recent call last):
  File "lama/eval_generation.py", line 7, in <module>
    from lama.modules import build_model_by_name
  File "/home/feabries/projects/LAMA/lama/modules/__init__.py", line 11, in <module>
    from .roberta_connector import Roberta
  File "/home/feabries/projects/LAMA/lama/modules/roberta_connector.py", line 7, in <module>
    from fairseq.models.roberta import RobertaModel
ModuleNotFoundError: No module named 'fairseq.models.roberta'

The error comes from the line in lama/modules/roberta_connector.py, which imports Roberta model class using fairseq:

from fairseq.models.roberta import RobertaModel

It seems that the versions of fairseq in requirements.txt and setup.py are different (#42). The above code works fine for fairseq==0.8.0, but fails on fairseq==0.6.1, so I change the fairseq version to 0.8.0 in setup.py in the pull request.

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Sep 17, 2021
@SuJiaKuan SuJiaKuan changed the title Fix wrong fairseq version in setup.py Fix wrong fairseq version in setup.py Sep 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants