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

Models don't load with allennlp>=1.2.0 #164

Open
JohnGiorgi opened this issue Nov 11, 2020 · 2 comments
Open

Models don't load with allennlp>=1.2.0 #164

JohnGiorgi opened this issue Nov 11, 2020 · 2 comments

Comments

@JohnGiorgi
Copy link
Owner

The pretrained models do not load properly with allennlp>=1.2.0. The error reported is:

RuntimeError: Error loading state dict for DeCLUTR
    Missing keys: []
    Unexpected keys: ['_text_field_embedder.token_embedder_tokens.transformer_model.roberta.pooler.dense.weight', '_text_field_embedder.token_embedder_tokens.transformer_model.roberta.pooler.dense.bias']

For now, I will constrain the dependency to be "allennlp>=1.1.0, <1.2.0", but it would be great to find another solution (short of re-training the model).

@JohnGiorgi JohnGiorgi pinned this issue Jan 27, 2021
@JohnGiorgi
Copy link
Owner Author

JohnGiorgi commented Feb 16, 2021

This problem is solved by migrating to AllenNLP>=2.0.0. I will close this once I have merged the migration and re-trained the models.

@JohnGiorgi
Copy link
Owner Author

Also see: allenai/allennlp#4621 (comment)

Which may allow us to avoid re-training

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