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

GH-3536: fix state dict key mismatch for embeddings in TextPairRegres… #3537

Conversation

MattGPT-ai
Copy link
Contributor

Closes #3536

This simply corrects the state dict name when loading the model from state dict. It is perhaps less ideal to do this than to make the __init__ args consistent with the keys used in _get_state_dict and _init_model_with_state_dict. However, such changes could affect currently saved models or the expected API of Flair, so I went with this safer option.

@MattGPT-ai MattGPT-ai force-pushed the fix.text-pair-regressor-state-dict-key-bug branch 2 times, most recently from c216fff to 22c80a4 Compare August 22, 2024 23:20
@helpmefindaname helpmefindaname force-pushed the fix.text-pair-regressor-state-dict-key-bug branch from 22c80a4 to a458f5b Compare August 23, 2024 13:28
Copy link
Collaborator

@helpmefindaname helpmefindaname left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for fixing this

…irRegressor. this was causing a bug where the model failed to load from the output state dict
@helpmefindaname helpmefindaname force-pushed the fix.text-pair-regressor-state-dict-key-bug branch from a458f5b to d6874a6 Compare August 23, 2024 13:42
@helpmefindaname helpmefindaname merged commit 3685529 into flairNLP:master Aug 23, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

[Bug]: TextPairRegressor has state dict key mismatch for embedding
2 participants