Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
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