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

allennlp.common.checks.ConfigurationError: calculate_span_f1 is True, but no label_encoding was specified. #3

Open
SongChujun opened this issue Jul 15, 2020 · 0 comments

Comments

@SongChujun
Copy link

running python example.py but got the following error

Traceback (most recent call last):
  File "test.py", line 5, in <module>
    archive = load_archive("wiki-truecaser-model-en.tar.gz")
  File "/Users/song/anaconda3/lib/python3.7/site-packages/allennlp/models/archival.py", line 197, in load_archive
    opt_level=opt_level,
  File "/Users/song/anaconda3/lib/python3.7/site-packages/allennlp/models/model.py", line 398, in load
    return model_class._load(config, serialization_dir, weights_file, cuda_device, opt_level)
  File "/Users/song/anaconda3/lib/python3.7/site-packages/allennlp/models/model.py", line 295, in _load
    model = Model.from_params(vocab=vocab, params=model_params)
  File "/Users/song/anaconda3/lib/python3.7/site-packages/allennlp/common/from_params.py", line 580, in from_params
    **extras,
  File "/Users/song/anaconda3/lib/python3.7/site-packages/allennlp/common/from_params.py", line 611, in from_params
    return constructor_to_call(**kwargs)  # type: ignore
  File "/Users/song/Desktop/nmt/joeynmt/chatnmt/code/pytorch-truecaser/mylib/truecaser.py", line 26, in __init__
    super(TrueCaser, self).__init__(vocab, text_field_embedder, encoder, initializer, regularizer)
  File "/Users/song/anaconda3/lib/python3.7/site-packages/allennlp/models/simple_tagger.py", line 100, in __init__
    "calculate_span_f1 is True, but no label_encoding was specified."
allennlp.common.checks.ConfigurationError: calculate_span_f1 is True, but no label_encoding was specified.
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