TypeError: __init__() got an unexpected keyword argument 'lazy'
Trying to run the truecaser with this command:
allennlp train truecaser.json --include-package mylib -s ./truecaser/pytorch-truecaser-master/mylib
I got this output:
2021-04-21 17:01:45,360 - INFO - allennlp.common.params - include_in_archive = None
2021-04-21 17:01:45,361 - INFO - allennlp.common.params - random_seed = 13370
2021-04-21 17:01:45,361 - INFO - allennlp.common.params - numpy_seed = 1337
2021-04-21 17:01:45,361 - INFO - allennlp.common.params - pytorch_seed = 133
2021-04-21 17:01:45,363 - INFO - allennlp.common.checks - Pytorch version: 1.8.0+cpu
2021-04-21 17:01:45,363 - INFO - allennlp.common.params - type = default
2021-04-21 17:01:45,364 - INFO - allennlp.common.params - dataset_reader.type = truecaser_reader
2021-04-21 17:01:45,364 - INFO - allennlp.common.params - dataset_reader.token_indexers.tokens.type = single_id
2021-04-21 17:01:45,364 - INFO - allennlp.common.params - dataset_reader.token_indexers.tokens.namespace = tokens
2021-04-21 17:01:45,364 - INFO - allennlp.common.params - dataset_reader.token_indexers.tokens.lowercase_tokens = False
2021-04-21 17:01:45,365 - INFO - allennlp.common.params - dataset_reader.token_indexers.tokens.start_tokens = None
2021-04-21 17:01:45,365 - INFO - allennlp.common.params - dataset_reader.token_indexers.tokens.end_tokens = None
2021-04-21 17:01:45,365 - INFO - allennlp.common.params - dataset_reader.token_indexers.tokens.feature_name = text
2021-04-21 17:01:45,365 - INFO - allennlp.common.params - dataset_reader.token_indexers.tokens.default_value = THIS IS A REALLY UNLIKELY VALUE THAT HAS TO BE A STRING
2021-04-21 17:01:45,365 - INFO - allennlp.common.params - dataset_reader.token_indexers.tokens.token_min_padding_length = 0
2021-04-21 17:01:45,365 - INFO - allennlp.common.params - dataset_reader.word_splitter.type = spacy
2021-04-21 17:01:45,365 - CRITICAL - root - Uncaught exception
Traceback (most recent call last):
File "/home/alyferryhalo/.local/bin/allennlp", line 8, in
Which version of AllenNLP are you using? This was made with 0.8.2, but there have been several breaking changes since then.
Oh. Unfortunately my version is 2.2.0 but I have tried to install 0.8.2 with pip3 install allennlp==0.8.2 and in the conda env.
There is error: PackagesNotFoundError: The following packages are not available from current channels:
- allennlp==0.8.2
Do you know, is it possible to find the right version? Or do I need to try to write a new code on the base of your code?
That's strange, maybe it's not available in conda? It's available in pypi. I just did this, and it worked:
$ python --version
Python 3.7.3
$ python -m venv env
$ source env/bin/activate
$ pip install allennlp==0.8.2