We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
A DefaultClassifier if trained with special loss weights train normally, but the model cannot be loaded.
from flair.datasets import CONLL_03 from flair.embeddings import TransformerWordEmbeddings from flair.models import TokenClassifier from flair.trainers import ModelTrainer corpus = CONLL_03().downsample(0.01) dictionary = corpus.make_label_dictionary("ner") classifier = TokenClassifier( embeddings=TransformerWordEmbeddings("distilbert-base-uncased", fine_tune=False), label_dictionary=dictionary, label_type="ner", loss_weights={"B-PER": 0.0, "I-PER": 0.0, "E-PER": 0.0, "S-PER": 0.0}, ) trainer = ModelTrainer(classifier, corpus) trainer.train("resources/models/tune", max_epochs=1)
Correct loading of model
No response
0.14.0
2.0.0+cu117
4.39.1
True
The text was updated successfully, but these errors were encountered:
Fix is forthcoming
Sorry, something went wrong.
GH-3585: Fix DefaultClassifier deserialization
9359232
Merge pull request #3586 from flairNLP/GH-3585-deserialization
29feea4
flairNLPGH-3585: Fix DefaultClassifier deserialization
5e9b90b
Successfully merging a pull request may close this issue.
Describe the bug
A DefaultClassifier if trained with special loss weights train normally, but the model cannot be loaded.
To Reproduce
Expected behavior
Correct loading of model
Logs and Stack traces
No response
Screenshots
No response
Additional Context
No response
Environment
Versions:
Flair
0.14.0
Pytorch
2.0.0+cu117
Transformers
4.39.1
GPU
True
The text was updated successfully, but these errors were encountered: