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

KeyErrors if using other dataset #7

Open
bug-orz opened this issue Mar 13, 2021 · 0 comments
Open

KeyErrors if using other dataset #7

bug-orz opened this issue Mar 13, 2021 · 0 comments

Comments

@bug-orz
Copy link

bug-orz commented Mar 13, 2021

I'm trying to test this method on my own dataset, and I met KeyErrors. Do you please kown how to solve this problem? Thanks a lot!

Traceback (most recent call last):
File "/data/anaconda3/envs/allennlp/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/data/anaconda3/envs/allennlp/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/data/anaconda3/envs/allennlp/lib/python3.6/site-packages/allennlp/run.py", line 18, in
main(prog="allennlp")
File "/data/anaconda3/envs/allennlp/lib/python3.6/site-packages/allennlp/commands/init.py", line 72, in main
args.func(args)
File "/data/anaconda3/envs/allennlp/lib/python3.6/site-packages/allennlp/commands/train.py", line 111, in train_model_from_args
args.force)
File "/data/anaconda3/envs/allennlp/lib/python3.6/site-packages/allennlp/commands/train.py", line 142, in train_model_from_file
return train_model(params, serialization_dir, file_friendly_logging, recover, force)
File "/data/anaconda3/envs/allennlp/lib/python3.6/site-packages/allennlp/commands/train.py", line 298, in train_model
model = Model.from_params(vocab=vocab, params=params.pop('model'))
File "/data/anaconda3/envs/allennlp/lib/python3.6/site-packages/allennlp/common/from_params.py", line 274, in from_params
return subclass.from_params(params=params, **extras)
File "/data/anaconda3/envs/allennlp/lib/python3.6/site-packages/allennlp/common/from_params.py", line 287, in from_params
return cls(**kwargs) # type: ignore
File "/data/DISTRE/tre/model.py", line 235, in init
self.na_idx = self.vocab.get_token_to_index_vocabulary('labels')['NA']
KeyError: 'NA'

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