Skip to content

lesson 3 #12

@Mayar2009

Description

@Mayar2009

I got this error

(base) arij@arij-HP-ProBook-450-G4:~/allennlp_tutorial$ allennlp train -f --include-package tagging -s /tmp/tagging/lstm configs/train_lstm.jsonnet
2020-09-16 07:13:12,680 - INFO - allennlp.common.params - random_seed = 13370
2020-09-16 07:13:12,681 - INFO - allennlp.common.params - numpy_seed = 1337
2020-09-16 07:13:12,681 - INFO - allennlp.common.params - pytorch_seed = 133
2020-09-16 07:13:12,690 - INFO - allennlp.common.checks - Pytorch version: 1.6.0
2020-09-16 07:13:12,690 - INFO - allennlp.common.params - type = default
2020-09-16 07:13:12,691 - INFO - allennlp.common.params - dataset_reader.type = conll_03_reader
2020-09-16 07:13:12,691 - INFO - allennlp.common.params - dataset_reader.token_indexers = None
2020-09-16 07:13:12,691 - INFO - allennlp.common.params - dataset_reader.lazy = False
2020-09-16 07:13:12,691 - INFO - allennlp.common.params - train_data_path = data/train.txt
2020-09-16 07:13:12,692 - INFO - allennlp.common.params - vocabulary = None
2020-09-16 07:13:12,692 - INFO - allennlp.common.params - datasets_for_vocab_creation = None
2020-09-16 07:13:12,692 - INFO - allennlp.common.params - validation_dataset_reader = None
2020-09-16 07:13:12,692 - INFO - allennlp.common.params - validation_data_path = data/validation.txt
2020-09-16 07:13:12,692 - INFO - allennlp.common.params - validation_data_loader = None
2020-09-16 07:13:12,692 - INFO - allennlp.common.params - test_data_path = None
2020-09-16 07:13:12,692 - INFO - allennlp.common.params - evaluate_on_test = False
2020-09-16 07:13:12,692 - INFO - allennlp.common.params - batch_weight_key =
2020-09-16 07:13:12,692 - INFO - allennlp.training.util - Reading training data from data/train.txt
reading instances: 14987it [00:00, 22660.99it/s]
2020-09-16 07:13:13,354 - INFO - allennlp.training.util - Reading validation data from data/validation.txt
reading instances: 3466it [00:00, 14769.80it/s]
2020-09-16 07:13:13,589 - INFO - allennlp.data.vocabulary - Fitting token dictionary from dataset.
building vocab: 18453it [00:00, 94424.38it/s]
2020-09-16 07:13:13,822 - CRITICAL - root - Uncaught exception
Traceback (most recent call last):
File "/home/arij/anaconda3/lib/python3.8/site-packages/allennlp/common/params.py", line 238, in pop
value = self.params.pop(key)
KeyError: 'type'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/arij/anaconda3/bin/allennlp", line 8, in
sys.exit(run())
File "/home/arij/anaconda3/lib/python3.8/site-packages/allennlp/main.py", line 34, in run
main(prog="allennlp")
File "/home/arij/anaconda3/lib/python3.8/site-packages/allennlp/commands/init.py", line 92, in main
args.func(args)
File "/home/arij/anaconda3/lib/python3.8/site-packages/allennlp/commands/train.py", line 109, in train_model_from_args
train_model_from_file(
File "/home/arij/anaconda3/lib/python3.8/site-packages/allennlp/commands/train.py", line 169, in train_model_from_file
return train_model(
File "/home/arij/anaconda3/lib/python3.8/site-packages/allennlp/commands/train.py", line 232, in train_model
model = train_worker(
File "/home/arij/anaconda3/lib/python3.8/site-packages/allennlp/commands/train.py", line 430, in train_worker
train_loop = TrainModel.from_params(
File "/home/arij/anaconda3/lib/python3.8/site-packages/allennlp/common/from_params.py", line 591, in from_params
return retyped_subclass.from_params(
File "/home/arij/anaconda3/lib/python3.8/site-packages/allennlp/common/from_params.py", line 624, in from_params
return constructor_to_call(**kwargs) # type: ignore
File "/home/arij/anaconda3/lib/python3.8/site-packages/allennlp/commands/train.py", line 648, in from_partial_objects
model
= model.construct(vocab=vocabulary
)
File "/home/arij/anaconda3/lib/python3.8/site-packages/allennlp/common/lazy.py", line 46, in construct
return self._constructor(**kwargs)
File "/home/arij/anaconda3/lib/python3.8/site-packages/allennlp/common/from_params.py", line 461, in constructor
return value_cls.from_params(params=deepcopy(popped_params), **constructor_extras)
File "/home/arij/anaconda3/lib/python3.8/site-packages/allennlp/common/from_params.py", line 572, in from_params
choice = params.pop_choice(
File "/home/arij/anaconda3/lib/python3.8/site-packages/allennlp/common/params.py", line 342, in pop_choice
value = self.pop(key, default)
File "/home/arij/anaconda3/lib/python3.8/site-packages/allennlp/common/params.py", line 243, in pop
raise ConfigurationError(msg)
allennlp.common.checks.ConfigurationError: key "type" is required at location "model."

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions