Hi, trying to use your code and receiving the following error:
/home/cheshani/anaconda3/envs/knowbert/lib/python3.6/site-packages/sklearn/utils/linearassignment.py:22: FutureWarning: The linearassignment module is deprecated in 0.21 and will be removed from 0.23. Use scipy.optimize.linear_sum_assignment instead.
FutureWarning)
/home/cheshani/anaconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/token_indexers/token_characters_indexer.py:51: UserWarning: You are using the default value (0) of min_padding_length, which can cause some subtle bugs (more info see https://github.com/allenai/allennlp/issues/1954). Strongly recommend to set a value, usually the maximum size of the convolutional layer size when using CnnEncoder.
UserWarning)
Traceback (most recent call last):
File "KnowBERT_run.py", line 13, in
batcher = KnowBertBatchifier(archive_file)
File "/home/cheshani/kb-master/kb/knowbert_utils.py", line 61, in init
from_params(Params(candidate_generator_params))
File "/home/cheshani/anaconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/common/from_params.py", line 289, in from_params
return subclass.from_params(params=params, extras)
File "/home/cheshani/anaconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/common/from_params.py", line 300, in from_params
kwargs = create_kwargs(cls, params, extras)
File "/home/cheshani/anaconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/common/from_params.py", line 194, in create_kwargs
value_dict[key] = value_cls.from_params(params=value_params, extras)
File "/home/cheshani/anaconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/common/from_params.py", line 289, in from_params
return subclass.from_params(params=params, extras)
File "/home/cheshani/anaconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/common/from_params.py", line 302, in from_params
return cls(kwargs) # type: ignore
File "/home/cheshani/kb-master/kb/wiki_linking_util.py", line 153, in init
self.entity_world = json.load(open(entity_world_path))
File "/home/cheshani/anaconda3/envs/knowbert/lib/python3.6/json/init.py", line 299, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, kw)
File "/home/cheshani/anaconda3/envs/knowbert/lib/python3.6/json/init.py", line 354, in loads
return _default_decoder.decode(s)
File "/home/cheshani/anaconda3/envs/knowbert/lib/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/home/cheshani/anaconda3/envs/knowbert/lib/python3.6/json/decoder.py", line 355, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Unterminated string starting at: line 13438 column 5 (char 522455)
Hi, trying to use your code and receiving the following error:
/home/cheshani/anaconda3/envs/knowbert/lib/python3.6/site-packages/sklearn/utils/linearassignment.py:22: FutureWarning: The linearassignment module is deprecated in 0.21 and will be removed from 0.23. Use scipy.optimize.linear_sum_assignment instead. FutureWarning) /home/cheshani/anaconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/token_indexers/token_characters_indexer.py:51: UserWarning: You are using the default value (0) of
batcher = KnowBertBatchifier(archive_file)
File "/home/cheshani/kb-master/kb/knowbert_utils.py", line 61, in init
from_params(Params(candidate_generator_params))
File "/home/cheshani/anaconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/common/from_params.py", line 289, in from_params
return subclass.from_params(params=params, extras)
File "/home/cheshani/anaconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/common/from_params.py", line 300, in from_params
kwargs = create_kwargs(cls, params, extras)
File "/home/cheshani/anaconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/common/from_params.py", line 194, in create_kwargs
value_dict[key] = value_cls.from_params(params=value_params, extras)
File "/home/cheshani/anaconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/common/from_params.py", line 289, in from_params
return subclass.from_params(params=params, extras)
File "/home/cheshani/anaconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/common/from_params.py", line 302, in from_params
return cls(kwargs) # type: ignore
File "/home/cheshani/kb-master/kb/wiki_linking_util.py", line 153, in init
self.entity_world = json.load(open(entity_world_path))
File "/home/cheshani/anaconda3/envs/knowbert/lib/python3.6/json/init.py", line 299, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, kw)
File "/home/cheshani/anaconda3/envs/knowbert/lib/python3.6/json/init.py", line 354, in loads
return _default_decoder.decode(s)
File "/home/cheshani/anaconda3/envs/knowbert/lib/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/home/cheshani/anaconda3/envs/knowbert/lib/python3.6/json/decoder.py", line 355, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Unterminated string starting at: line 13438 column 5 (char 522455)
min_padding_length
, which can cause some subtle bugs (more info see https://github.com/allenai/allennlp/issues/1954). Strongly recommend to set a value, usually the maximum size of the convolutional layer size when using CnnEncoder. UserWarning) Traceback (most recent call last): File "KnowBERT_run.py", line 13, in