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

Older pytorch-transformer versions error #5

Open
JJMinton opened this issue Aug 25, 2022 · 0 comments
Open

Older pytorch-transformer versions error #5

JJMinton opened this issue Aug 25, 2022 · 0 comments

Comments

@JJMinton
Copy link

With pytorch-transformer==1.0.0 fails to run the evaluate command with the following error.

  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.8/site-packages/nubia_score/nubia.py", line 190, in score
    nubia, gpt_ref = self.nubia(ref, hyp, get_features=True, six_dim=six_dim,
  File "/usr/local/lib/python3.8/site-packages/nubia_score/nubia.py", line 128, in nubia
    gpt_ref = self._gpt_score(ref)
  File "/usr/local/lib/python3.8/site-packages/nubia_score/nubia.py", line 113, in _gpt_score
    tensor_input = torch.tensor([[self.tokenizer. eos_token_id] +
AttributeError: 'GPT2Tokenizer' object has no attribute 'eos_token_id'

Upgrading to pytorch-transformer==1.2.0 solves this so the requirements in setup.py should be constrained to avoid this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant